gemini
gemini
Purpose
This skill interfaces with the Google Gemini API to enable advanced AI interactions, focusing on multimodal inputs, extended context handling, and integrated features like function calling and code execution. Use it to extend OpenClaw's capabilities for complex tasks requiring large-scale context or multimedia processing.
When to Use
Use this skill for tasks involving long-form conversations (up to 1M tokens), multimodal data (e.g., text + images), or dynamic function calls. Ideal for code generation, data grounding, or API-based workflows in applications like chatbots, content analysis, or automated scripting. Avoid it for simple text-only tasks where lighter models suffice.
Key Capabilities
- Multimodal support: Process text, images, and audio via the Gemini API; e.g., send an image URL with text for analysis.
- Long context: Handle up to 1M tokens for extended conversations; specify context in requests to maintain state.
- Function calling: Define and call external functions dynamically; use the API's tools parameter to specify functions.
- Grounding: Integrate real-time data fetching for accurate responses; enable via the grounding config in requests.
- Code execution: Generate and execute code snippets; ensure safe execution by wrapping in try-catch blocks.
- API endpoints: Primary endpoint is
https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContentfor text generation.
Usage Patterns
To use this skill, first set the API key via environment variable (export GEMINI_API_KEY=your_key). Then, invoke it in OpenClaw by referencing the skill ID ("gemini") in your agent prompt. For API calls, structure requests as JSON payloads with authentication in the header. Pattern: Load the skill, prepare input data (e.g., multimodal array), send the request, and parse the response. Always check for rate limits by monitoring API responses. For repeated use, cache responses or use streaming for long contexts.
More from alphaonedev/openclaw-graph
playwright-scraper
Playwright web scraping: dynamic content, auth flows, pagination, data extraction, screenshots
1.4Kgcp-iam
Manages identity and access control for Google Cloud resources using IAM policies and roles.
370humanize-ai-text
AI text humanization: reduce AI-detection patterns, natural phrasing, tone adjustment
260macos-automation
AppleScript, JXA, Shortcuts, Automator, osascript, System Events, accessibility API
173tavily-web-search
Tavily: web search optimized for AI agents, answer synthesis, domain filtering, depth control
154clawflows
OpenClaw workflow automation: multi-step task chains, conditional logic, triggers, schedule
102