aixtools 0.3.4__tar.gz → 0.3.6__tar.gz
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.
Potentially problematic release.
This version of aixtools might be problematic. Click here for more details.
- {aixtools-0.3.4 → aixtools-0.3.6}/PKG-INFO +1 -1
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/_version.py +3 -3
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/server/path.py +1 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/testing/aix_test_model.py +39 -8
- {aixtools-0.3.4 → aixtools-0.3.6}/README.md +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/.chainlit/config.toml +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/.chainlit/translations/bn.json +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/.chainlit/translations/en-US.json +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/.chainlit/translations/gu.json +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/.chainlit/translations/he-IL.json +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/.chainlit/translations/hi.json +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/.chainlit/translations/ja.json +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/.chainlit/translations/kn.json +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/.chainlit/translations/ml.json +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/.chainlit/translations/mr.json +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/.chainlit/translations/nl.json +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/.chainlit/translations/ta.json +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/.chainlit/translations/te.json +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/.chainlit/translations/zh-CN.json +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/__init__.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/a2a/app.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/a2a/auth_middleware.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/a2a/google_sdk/__init__.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/a2a/google_sdk/pydantic_ai_adapter/agent_executor.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/a2a/google_sdk/pydantic_ai_adapter/storage.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/a2a/google_sdk/remote_agent_connection.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/a2a/google_sdk/utils.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/a2a/utils.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/agents/__init__.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/agents/agent.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/agents/agent_batch.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/agents/nodes_to_md.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/agents/nodes_to_message.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/agents/nodes_to_str.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/agents/print_nodes.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/agents/prompt.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/app.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/auth/__init__.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/auth/auth.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/chainlit.md +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/compliance/__init__.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/compliance/private_data.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/context.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/db/__init__.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/db/database.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/db/vector_db.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/evals/__init__.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/evals/__main__.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/evals/dataset.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/evals/discovery.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/evals/run_evals.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/google/client.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/log_view/__init__.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/log_view/app.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/log_view/display.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/log_view/export.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/log_view/filters.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/log_view/log_utils.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/log_view/node_summary.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/logfilters/__init__.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/logfilters/context_filter.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/logging/__init__.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/logging/log_objects.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/logging/logging_config.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/logging/mcp_log_models.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/logging/mcp_logger.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/logging/model_patch_logging.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/logging/open_telemetry.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/mcp/__init__.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/mcp/client.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/mcp/example_client.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/mcp/example_server.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/mcp/exceptions.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/mcp/fast_mcp_log.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/mcp/faulty_mcp.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/mcp/middleware.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/mcp/server.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/model_patch/model_patch.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/server/__init__.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/server/app_mounter.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/server/utils.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/testing/__init__.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/testing/agent_mock.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/testing/mock_tool.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/testing/model_patch_cache.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/tools/doctor/__init__.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/tools/doctor/mcp_tool_doctor.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/tools/doctor/tool_doctor.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/tools/doctor/tool_recommendation.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/utils/__init__.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/utils/chainlit/cl_agent_show.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/utils/chainlit/cl_utils.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/utils/config.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/utils/config_util.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/utils/enum_with_description.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/utils/files.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/utils/persisted_dict.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/utils/utils.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/vault/__init__.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools/vault/vault.py +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/aixtools.egg-info/SOURCES.txt +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/pyproject.toml +0 -0
- {aixtools-0.3.4 → aixtools-0.3.6}/setup.cfg +0 -0
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.3.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 3,
|
|
31
|
+
__version__ = version = '0.3.6'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 3, 6)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'g4f918962b'
|
|
@@ -36,6 +36,7 @@ def get_workspace_path(ctx: Context | tuple | None = None) -> Path:
|
|
|
36
36
|
Returns: The workspace path as a Path object.
|
|
37
37
|
"""
|
|
38
38
|
user_id, session_id = ctx if isinstance(ctx, tuple) else get_session_id_tuple(ctx)
|
|
39
|
+
user_id = user_id.lower() # to handle tuple passed directly
|
|
39
40
|
return WORKSPACES_ROOT_DIR / user_id / session_id
|
|
40
41
|
|
|
41
42
|
|
|
@@ -19,6 +19,20 @@ from ..utils.utils import async_iter
|
|
|
19
19
|
FINAL_RESULT_TOOL_NAME = "final_result"
|
|
20
20
|
|
|
21
21
|
|
|
22
|
+
def _convert_to_parts(items: list[str | TextPart | ToolCallPart]) -> list[TextPart | ToolCallPart]:
|
|
23
|
+
"""Convert a list of strings, TextParts, or ToolCallParts to a list of Parts."""
|
|
24
|
+
parts: list[TextPart | ToolCallPart] = []
|
|
25
|
+
for item in items:
|
|
26
|
+
match item:
|
|
27
|
+
case str():
|
|
28
|
+
parts.append(TextPart(item))
|
|
29
|
+
case TextPart() | ToolCallPart():
|
|
30
|
+
parts.append(item)
|
|
31
|
+
case _:
|
|
32
|
+
raise ValueError(f"Invalid item type in list: {type(item)}, item: {item}")
|
|
33
|
+
return parts
|
|
34
|
+
|
|
35
|
+
|
|
22
36
|
def final_result_tool(result: BaseModel | dict) -> ToolCallPart:
|
|
23
37
|
"""Create a ToolCallPart for the final result."""
|
|
24
38
|
if isinstance(result, BaseModel):
|
|
@@ -33,7 +47,11 @@ class AixTestModel(Model):
|
|
|
33
47
|
Test model, returns a specified list of answers, including messages or tool calls
|
|
34
48
|
This is used for testing the agent and model interaction with the rest of the system.
|
|
35
49
|
|
|
36
|
-
responses: Is a list of
|
|
50
|
+
responses: Is a list of response items that the model will return in order. Each item can be:
|
|
51
|
+
- str: A simple text response
|
|
52
|
+
- TextPart: A text part
|
|
53
|
+
- ToolCallPart: A tool call
|
|
54
|
+
- list[str | TextPart | ToolCallPart]: Multiple parts in a single response
|
|
37
55
|
|
|
38
56
|
Note: The agent will continue to invoke 'request()' until it returns a txt (i.e. not a ToolCallPart).
|
|
39
57
|
|
|
@@ -69,11 +87,25 @@ class AixTestModel(Model):
|
|
|
69
87
|
]
|
|
70
88
|
)
|
|
71
89
|
```
|
|
90
|
+
|
|
91
|
+
Example with multiple parts in a single response:
|
|
92
|
+
```
|
|
93
|
+
model = AixTestModel(
|
|
94
|
+
responses=[
|
|
95
|
+
[
|
|
96
|
+
"First, let me think about this...",
|
|
97
|
+
ToolCallPart(tool_name='analyze', args={'data': 'xyz'}),
|
|
98
|
+
TextPart("Analysis complete."),
|
|
99
|
+
],
|
|
100
|
+
"Final answer after analysis.",
|
|
101
|
+
]
|
|
102
|
+
)
|
|
103
|
+
```
|
|
72
104
|
"""
|
|
73
105
|
|
|
74
106
|
def __init__( # pylint: disable=super-init-not-called
|
|
75
107
|
self,
|
|
76
|
-
responses: list[str | TextPart | ToolCallPart] | AsyncGeneratorType,
|
|
108
|
+
responses: list[str | TextPart | ToolCallPart | list[str | TextPart | ToolCallPart]] | AsyncGeneratorType,
|
|
77
109
|
sleep_time: float | None = None,
|
|
78
110
|
):
|
|
79
111
|
self.response_iter = responses(self) if callable(responses) else async_iter(responses)
|
|
@@ -141,15 +173,14 @@ class AixTestModel(Model):
|
|
|
141
173
|
if callable(res):
|
|
142
174
|
res = res(self, messages)
|
|
143
175
|
match res:
|
|
144
|
-
case str():
|
|
145
|
-
return ModelResponse(parts=[TextPart(res)], model_name=self.model_name)
|
|
146
|
-
case ToolCallPart():
|
|
147
|
-
return ModelResponse(parts=[res], model_name=self.model_name)
|
|
148
|
-
case TextPart():
|
|
149
|
-
return ModelResponse(parts=[res], model_name=self.model_name)
|
|
150
176
|
case Exception():
|
|
151
177
|
raise res
|
|
178
|
+
case list():
|
|
179
|
+
parts = _convert_to_parts(res)
|
|
180
|
+
case str() | TextPart() | ToolCallPart():
|
|
181
|
+
parts = _convert_to_parts([res])
|
|
152
182
|
case _:
|
|
153
183
|
raise ValueError(f"Invalid response type: {type(res)}, response: {res}")
|
|
154
184
|
if self.sleep_time:
|
|
155
185
|
await asyncio.sleep(self.sleep_time)
|
|
186
|
+
return ModelResponse(parts=parts, model_name=self.model_name)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aixtools-0.3.4 → aixtools-0.3.6}/aixtools/a2a/google_sdk/pydantic_ai_adapter/agent_executor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|