Skip to content

Commit

Permalink
Merge branch 'main' into lance-db-improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkbrnd authored Feb 14, 2025
2 parents b4d36aa + d237bda commit 7e13c2d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
3 changes: 2 additions & 1 deletion cookbook/models/ollama_tools/async_tool_use_stream.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"""Run `pip install duckduckgo-search` to install dependencies."""

import asyncio

from agno.agent import Agent
from agno.models.ollama import OllamaTools
from agno.tools.duckduckgo import DuckDuckGoTools
import asyncio

agent = Agent(
model=OllamaTools(id="llama3.1:8b"),
Expand Down
18 changes: 11 additions & 7 deletions libs/agno/agno/models/google/gemini.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def _format_image_for_message(image: Image) -> Optional[Dict[str, Any]]:
return None


def _convert_schema(schema_dict):
def _convert_schema(schema_dict) -> Optional[Schema]:
"""
Recursively convert a JSON-like schema dictionary to a types.Schema object.
Expand All @@ -103,12 +103,16 @@ def _convert_schema(schema_dict):
if schema_type == "OBJECT" and "properties" in schema_dict:
properties = {key: _convert_schema(prop_def) for key, prop_def in schema_dict["properties"].items()}
required = schema_dict.get("required", [])
return Schema(
type=schema_type,
properties=properties,
required=required,
description=description,
)

if properties:
return Schema(
type=schema_type,
properties=properties,
required=required,
description=description,
)
else:
return None
else:
return Schema(type=schema_type, description=description)

Expand Down
1 change: 1 addition & 0 deletions libs/agno/tests/integration/model/openai/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def test_image_input():

assert "golden" in response.content.lower()


def test_history_grows_exponentially():
db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai"
agent = Agent(
Expand Down

0 comments on commit 7e13c2d

Please sign in to comment.