cookbook/90_models/google/gemini/README.md
Note: Fork and clone this repository if needed
This cookbook is for testing Gemini models.
python3 -m venv ~/.venvs/aienv
source ~/.venvs/aienv/bin/activate
If you want to use the Gemini API, you need to export the following environment variables:
export GOOGLE_API_KEY=***
If you want to use Vertex AI, you need to export the following environment variables:
export GOOGLE_GENAI_USE_VERTEXAI="true"
export GOOGLE_CLOUD_PROJECT="your-project-id"
export GOOGLE_CLOUD_LOCATION="your-location"
uv pip install -U google-generativeai ddgs yfinance agno
python cookbook/92_models/google/gemini/basic_stream.py
python cookbook/92_models/google/gemini/basic.py
python cookbook/92_models/google/gemini/tool_use.py
python cookbook/92_models/google/gemini/structured_output.py
python cookbook/92_models/google/gemini/storage.py
python cookbook/92_models/google/gemini/knowledge.py
python cookbook/92_models/google/gemini/audio_input_bytes_content.py
python cookbook/92_models/google/gemini/image_agent.py
or
python cookbook/92_models/google/gemini/image_agent_file_upload.py
python cookbook/92_models/google/gemini/video_agent_input_bytes_content.py
python cookbook/92_models/google/gemini/flash_thinking_agent.py
python cookbook/92_models/google/gemini/agent_with_thinking_budget.py
python cookbook/92_models/google/gemini/url_context.py
python cookbook/92_models/google/gemini/url_context_with_search.py
python cookbook/92_models/google/gemini/search.py
python cookbook/92_models/google/gemini/grounding.py
python cookbook/92_models/google/gemini/vertex_ai_search.py