agno 2.2.13__py3-none-any.whl → 2.3.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agno/agent/agent.py +197 -110
- agno/api/api.py +2 -0
- agno/db/base.py +26 -0
- agno/db/dynamo/dynamo.py +8 -0
- agno/db/dynamo/schemas.py +1 -0
- agno/db/firestore/firestore.py +8 -0
- agno/db/firestore/schemas.py +1 -0
- agno/db/gcs_json/gcs_json_db.py +8 -0
- agno/db/in_memory/in_memory_db.py +8 -1
- agno/db/json/json_db.py +8 -0
- agno/db/migrations/manager.py +199 -0
- agno/db/migrations/versions/__init__.py +0 -0
- agno/db/migrations/versions/v2_3_0.py +938 -0
- agno/db/mongo/async_mongo.py +16 -6
- agno/db/mongo/mongo.py +11 -0
- agno/db/mongo/schemas.py +3 -0
- agno/db/mongo/utils.py +17 -0
- agno/db/mysql/mysql.py +76 -3
- agno/db/mysql/schemas.py +20 -10
- agno/db/postgres/async_postgres.py +99 -25
- agno/db/postgres/postgres.py +75 -6
- agno/db/postgres/schemas.py +30 -20
- agno/db/redis/redis.py +15 -2
- agno/db/redis/schemas.py +4 -0
- agno/db/schemas/memory.py +13 -0
- agno/db/singlestore/schemas.py +11 -0
- agno/db/singlestore/singlestore.py +79 -5
- agno/db/sqlite/async_sqlite.py +97 -19
- agno/db/sqlite/schemas.py +10 -0
- agno/db/sqlite/sqlite.py +79 -2
- agno/db/surrealdb/surrealdb.py +8 -0
- agno/knowledge/chunking/semantic.py +7 -2
- agno/knowledge/embedder/nebius.py +1 -1
- agno/knowledge/knowledge.py +57 -86
- agno/knowledge/reader/csv_reader.py +7 -9
- agno/knowledge/reader/docx_reader.py +5 -5
- agno/knowledge/reader/field_labeled_csv_reader.py +16 -18
- agno/knowledge/reader/json_reader.py +5 -4
- agno/knowledge/reader/markdown_reader.py +8 -8
- agno/knowledge/reader/pdf_reader.py +11 -11
- agno/knowledge/reader/pptx_reader.py +5 -5
- agno/knowledge/reader/s3_reader.py +3 -3
- agno/knowledge/reader/text_reader.py +8 -8
- agno/knowledge/reader/web_search_reader.py +1 -48
- agno/knowledge/reader/website_reader.py +10 -10
- agno/models/anthropic/claude.py +319 -28
- agno/models/aws/claude.py +32 -0
- agno/models/azure/openai_chat.py +19 -10
- agno/models/base.py +612 -545
- agno/models/cerebras/cerebras.py +8 -11
- agno/models/cohere/chat.py +27 -1
- agno/models/google/gemini.py +39 -7
- agno/models/groq/groq.py +25 -11
- agno/models/meta/llama.py +20 -9
- agno/models/meta/llama_openai.py +3 -19
- agno/models/nebius/nebius.py +4 -4
- agno/models/openai/chat.py +30 -14
- agno/models/openai/responses.py +10 -13
- agno/models/response.py +1 -0
- agno/models/vertexai/claude.py +26 -0
- agno/os/app.py +8 -19
- agno/os/router.py +54 -0
- agno/os/routers/knowledge/knowledge.py +2 -2
- agno/os/schema.py +2 -2
- agno/session/agent.py +57 -92
- agno/session/summary.py +1 -1
- agno/session/team.py +62 -112
- agno/session/workflow.py +353 -57
- agno/team/team.py +227 -125
- agno/tools/models/nebius.py +5 -5
- agno/tools/models_labs.py +20 -10
- agno/tools/nano_banana.py +151 -0
- agno/tools/yfinance.py +12 -11
- agno/utils/http.py +111 -0
- agno/utils/media.py +11 -0
- agno/utils/models/claude.py +8 -0
- agno/utils/print_response/agent.py +33 -12
- agno/utils/print_response/team.py +22 -12
- agno/vectordb/couchbase/couchbase.py +6 -2
- agno/workflow/condition.py +13 -0
- agno/workflow/loop.py +13 -0
- agno/workflow/parallel.py +13 -0
- agno/workflow/router.py +13 -0
- agno/workflow/step.py +120 -20
- agno/workflow/steps.py +13 -0
- agno/workflow/workflow.py +76 -63
- {agno-2.2.13.dist-info → agno-2.3.1.dist-info}/METADATA +6 -2
- {agno-2.2.13.dist-info → agno-2.3.1.dist-info}/RECORD +91 -88
- agno/tools/googlesearch.py +0 -98
- {agno-2.2.13.dist-info → agno-2.3.1.dist-info}/WHEEL +0 -0
- {agno-2.2.13.dist-info → agno-2.3.1.dist-info}/licenses/LICENSE +0 -0
- {agno-2.2.13.dist-info → agno-2.3.1.dist-info}/top_level.txt +0 -0
agno/models/azure/openai_chat.py
CHANGED
|
@@ -5,7 +5,8 @@ from typing import Any, Dict, Optional
|
|
|
5
5
|
import httpx
|
|
6
6
|
|
|
7
7
|
from agno.models.openai.like import OpenAILike
|
|
8
|
-
from agno.utils.
|
|
8
|
+
from agno.utils.http import get_default_async_client, get_default_sync_client
|
|
9
|
+
from agno.utils.log import log_warning
|
|
9
10
|
|
|
10
11
|
try:
|
|
11
12
|
from openai import AsyncAzureOpenAI as AsyncAzureOpenAIClient
|
|
@@ -99,7 +100,12 @@ class AzureOpenAI(OpenAILike):
|
|
|
99
100
|
if isinstance(self.http_client, httpx.Client):
|
|
100
101
|
_client_params["http_client"] = self.http_client
|
|
101
102
|
else:
|
|
102
|
-
|
|
103
|
+
log_warning("http_client is not an instance of httpx.Client. Using default global httpx.Client.")
|
|
104
|
+
# Use global sync client when user http_client is invalid
|
|
105
|
+
_client_params["http_client"] = get_default_sync_client()
|
|
106
|
+
else:
|
|
107
|
+
# Use global sync client when no custom http_client is provided
|
|
108
|
+
_client_params["http_client"] = get_default_sync_client()
|
|
103
109
|
|
|
104
110
|
# Create client
|
|
105
111
|
self.client = AzureOpenAIClient(**_client_params)
|
|
@@ -117,15 +123,18 @@ class AzureOpenAI(OpenAILike):
|
|
|
117
123
|
|
|
118
124
|
_client_params: Dict[str, Any] = self._get_client_params()
|
|
119
125
|
|
|
120
|
-
if self.http_client
|
|
121
|
-
|
|
126
|
+
if self.http_client:
|
|
127
|
+
if isinstance(self.http_client, httpx.AsyncClient):
|
|
128
|
+
_client_params["http_client"] = self.http_client
|
|
129
|
+
else:
|
|
130
|
+
log_warning(
|
|
131
|
+
"http_client is not an instance of httpx.AsyncClient. Using default global httpx.AsyncClient."
|
|
132
|
+
)
|
|
133
|
+
# Use global async client when user http_client is invalid
|
|
134
|
+
_client_params["http_client"] = get_default_async_client()
|
|
122
135
|
else:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
# Create a new async HTTP client with custom limits
|
|
126
|
-
_client_params["http_client"] = httpx.AsyncClient(
|
|
127
|
-
limits=httpx.Limits(max_connections=1000, max_keepalive_connections=100)
|
|
128
|
-
)
|
|
136
|
+
# Use global async client when no custom http_client is provided
|
|
137
|
+
_client_params["http_client"] = get_default_async_client()
|
|
129
138
|
|
|
130
139
|
self.async_client = AsyncAzureOpenAIClient(**_client_params)
|
|
131
140
|
return self.async_client
|