Add Email and Calendar

This commit is contained in:
2026-02-28 20:07:54 +00:00
parent 0fdf75f3e9
commit 6aec914d77
12 changed files with 743 additions and 25 deletions

View File

@@ -202,6 +202,25 @@ def generate_image(prompt: str) -> str:
except Exception as e:
return f"Error generating image: {str(e)}"
@tool(
name="analyze_image",
description="Analyze or describe a local image file using AI vision",
parameters={
"image_path": {"type": "string", "description": "Path to the image file"},
"prompt": {"type": "string", "description": "What to ask about the image", "default": "Describe this image in detail."}
}
)
def analyze_image(image_path: str, prompt: str = "Describe this image in detail.") -> str:
"""Invokes the Ollama vision API"""
config = load_config()
vision_model = config.get("vision_model", "llama3.2-vision")
from ..core.ollama import OllamaClient
client = OllamaClient(config.get("ollama_url"))
print_status(f"Analyzing image with {vision_model}...")
return client.describe_image(image_path, prompt, model=vision_model)
@tool(
name="speak_text",
description="Convert text to speech using Piper TTS (high quality)",
@@ -290,4 +309,4 @@ else:
except Exception as e:
return f"Error using 'say': {e}"
return "No compatible TTS engine found. Please run the installer."
return "TTS engine not found. Please run the installer to set up Piper or Kokoro."