smarta2a 0.4.9__py3-none-any.whl → 0.4.10__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.
- smarta2a/model_providers/openai_provider.py +11 -7
- {smarta2a-0.4.9.dist-info → smarta2a-0.4.10.dist-info}/METADATA +1 -1
- {smarta2a-0.4.9.dist-info → smarta2a-0.4.10.dist-info}/RECORD +5 -5
- {smarta2a-0.4.9.dist-info → smarta2a-0.4.10.dist-info}/WHEEL +0 -0
- {smarta2a-0.4.9.dist-info → smarta2a-0.4.10.dist-info}/licenses/LICENSE +0 -0
@@ -160,15 +160,19 @@ class OpenAIProvider(BaseLLMProvider):
|
|
160
160
|
messages = [msg if isinstance(msg, Message) else Message(**msg) for msg in state.context_history]
|
161
161
|
openai_messages = self._convert_messages(messages)
|
162
162
|
max_iterations = 30
|
163
|
+
openai_functions = self._format_openai_functions()
|
163
164
|
|
164
165
|
for _ in range(max_iterations):
|
165
|
-
|
166
|
-
|
167
|
-
model
|
168
|
-
messages
|
169
|
-
|
170
|
-
|
171
|
-
|
166
|
+
|
167
|
+
create_kwargs = {
|
168
|
+
"model": self.model,
|
169
|
+
"messages": openai_messages,
|
170
|
+
**kwargs # Merge with existing kwargs
|
171
|
+
}
|
172
|
+
if openai_functions:
|
173
|
+
create_kwargs["functions"] = openai_functions # Add functions only if non-empty
|
174
|
+
|
175
|
+
response = await self.client.chat.completions.create(**create_kwargs)
|
172
176
|
msg = response.choices[0].message
|
173
177
|
|
174
178
|
# If no function call, return content
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: smarta2a
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.10
|
4
4
|
Summary: a Python framework that helps you build servers and AI agents that communicate using the A2A protocol
|
5
5
|
Project-URL: Homepage, https://github.com/siddharthsma/smarta2a
|
6
6
|
Project-URL: Bug Tracker, https://github.com/siddharthsma/smarta2a/issues
|
@@ -14,7 +14,7 @@ smarta2a/history_update_strategies/history_update_strategy.py,sha256=n2sfIGu8ztK
|
|
14
14
|
smarta2a/history_update_strategies/rolling_window_strategy.py,sha256=7Ch042JWt4TM_r1-sFKlSIxHj8VX1P3ZoqjCvIdeSqA,540
|
15
15
|
smarta2a/model_providers/__init__.py,sha256=hJj0w00JjqTiBgJmHmOWwL6MU_hwmro9xTiX3XYf6ts,148
|
16
16
|
smarta2a/model_providers/base_llm_provider.py,sha256=iQUqjnypl0f2M929iU0WhHoxAE4ek-NUFJPbEnNQ8-4,412
|
17
|
-
smarta2a/model_providers/openai_provider.py,sha256=
|
17
|
+
smarta2a/model_providers/openai_provider.py,sha256=SJfEOktgbjyZ3FtE-Q_K7dYJJI0khrltj2kJoYwz0WQ,12317
|
18
18
|
smarta2a/server/__init__.py,sha256=f2X454Ll4vJc02V4JLJHTN-h8u0TBm4d_FkiO4t686U,53
|
19
19
|
smarta2a/server/handler_registry.py,sha256=OVRG5dTvxB7qUNXgsqWxVNxIyRljUShSYxb1gtbi5XM,820
|
20
20
|
smarta2a/server/json_rpc_request_processor.py,sha256=qRB3sfj_n9ImkIOCdaUKMsDmKcO7CiMhaZ4VdQS7Mb4,6993
|
@@ -34,7 +34,7 @@ smarta2a/utils/task_builder.py,sha256=wqSyfVHNTaXuGESu09dhlaDi7D007gcN3-8tH-nPQ4
|
|
34
34
|
smarta2a/utils/task_request_builder.py,sha256=6cOGOqj2Rg43xWM03GRJQzlIZHBptsMCJRp7oD-TDAQ,3362
|
35
35
|
smarta2a/utils/tools_manager.py,sha256=igKYeSi0SaYzd36jUqOMPvnYd5kK55EPQ0X_pdTo5e4,4857
|
36
36
|
smarta2a/utils/types.py,sha256=kzA6Vv5xXfu1sJuxhEXrglI9e9S6eZVIljMnsrQVyN0,13650
|
37
|
-
smarta2a-0.4.
|
38
|
-
smarta2a-0.4.
|
39
|
-
smarta2a-0.4.
|
40
|
-
smarta2a-0.4.
|
37
|
+
smarta2a-0.4.10.dist-info/METADATA,sha256=7n_5EbrUNDyoWXrzngKk_BObSeeZn4wJ27JqLo5fz5E,12988
|
38
|
+
smarta2a-0.4.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
39
|
+
smarta2a-0.4.10.dist-info/licenses/LICENSE,sha256=lDbqrxVnzDMY5KJ8JS1WhvkWE8TJaw-O-CHDy-ecsJA,2095
|
40
|
+
smarta2a-0.4.10.dist-info/RECORD,,
|
File without changes
|
File without changes
|