attp-client 0.0.5__tar.gz → 0.0.7__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.
- {attp_client-0.0.5 → attp_client-0.0.7}/PKG-INFO +1 -1
- {attp_client-0.0.5 → attp_client-0.0.7}/pyproject.toml +1 -1
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/inference.py +16 -9
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/session.py +1 -1
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/tools.py +16 -12
- {attp_client-0.0.5 → attp_client-0.0.7}/README.md +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/__init__.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/catalog.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/client.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/consts.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/errors/attp_exception.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/errors/correlated_rpc_exception.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/errors/dead_session.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/errors/not_found.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/errors/serialization_error.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/errors/unauthenticated_error.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/interfaces/catalogs/catalog.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/interfaces/catalogs/tools/envelope.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/interfaces/error.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/interfaces/handshake/auth.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/interfaces/handshake/hello.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/interfaces/handshake/ready.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/interfaces/inference/enums/message_data_type.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/interfaces/inference/enums/message_emergency_type.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/interfaces/inference/enums/message_type.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/interfaces/inference/message.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/interfaces/inference/tool.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/interfaces/route_mappings.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/misc/fixed_basemodel.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/misc/serializable.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/router.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/types/route_mapping.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/utils/context_awaiter.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/utils/route_mapper.py +0 -0
- {attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/utils/serializer.py +0 -0
@@ -67,11 +67,13 @@ class AttpInferenceAPI:
|
|
67
67
|
raise ValueError("Cannot find agent by two identification specifiers, use only one!")
|
68
68
|
|
69
69
|
response = await self.router.send("messages:inference:invoke", Serializable[dict[str, Any]]({
|
70
|
-
"
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
70
|
+
"data": {
|
71
|
+
"agent_id": agent_id,
|
72
|
+
"agent_name": agent_name,
|
73
|
+
"input_configuration": input_configuration,
|
74
|
+
"messages": [message.model_dump(mode="json") for message in (messages or [])],
|
75
|
+
"stream": stream
|
76
|
+
}
|
75
77
|
}), timeout=timeout, expected_response=IMessageResponse)
|
76
78
|
|
77
79
|
return response
|
@@ -107,9 +109,14 @@ class AttpInferenceAPI:
|
|
107
109
|
|
108
110
|
response = await self.router.send(
|
109
111
|
"messages:chat:invoke",
|
110
|
-
Serializable[dict[str, Any]]({
|
112
|
+
Serializable[dict[str, Any]]({
|
113
|
+
"data": {
|
114
|
+
"chat_id": str(chat_id),
|
115
|
+
"stream": stream
|
116
|
+
}
|
117
|
+
}),
|
111
118
|
timeout=timeout,
|
112
|
-
|
119
|
+
expected_response=IMessageResponse
|
113
120
|
)
|
114
121
|
|
115
122
|
return response
|
@@ -125,6 +132,6 @@ class AttpInferenceAPI:
|
|
125
132
|
"""
|
126
133
|
if isinstance(message, Sequence):
|
127
134
|
for msg in message:
|
128
|
-
await self.router.emit("messages:append", msg)
|
135
|
+
await self.router.emit("messages:append", Serializable[dict[str, Any]]({"data": msg}))
|
129
136
|
else:
|
130
|
-
await self.router.emit("messages:append", message)
|
137
|
+
await self.router.emit("messages:append", Serializable[dict[str, Any]]({"data": message}))
|
@@ -303,7 +303,7 @@ class SessionDriver:
|
|
303
303
|
|
304
304
|
else:
|
305
305
|
if self.is_authenticated:
|
306
|
-
self.logger.debug("cyan]ATTP[/] ┆ Handing incoming message to a route handler.")
|
306
|
+
self.logger.debug("[cyan]ATTP[/] ┆ Handing incoming message to a route handler.")
|
307
307
|
self.messages.put_nowait(event)
|
308
308
|
|
309
309
|
async def start_listener(self):
|
@@ -25,16 +25,18 @@ class ToolsManager:
|
|
25
25
|
response = await self.router.send(
|
26
26
|
"tools:register",
|
27
27
|
Serializable[dict[str, Any]]({
|
28
|
-
"
|
29
|
-
|
30
|
-
"
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
28
|
+
"data": {
|
29
|
+
"catalog": catalog_name,
|
30
|
+
"tool": {
|
31
|
+
"name": name,
|
32
|
+
"description": description,
|
33
|
+
"schema_id": schema_id,
|
34
|
+
"return_direct": return_direct,
|
35
|
+
"schema_ver": schema_ver,
|
36
|
+
"schema": schema,
|
37
|
+
"timeout_ms": timeout_ms,
|
38
|
+
"idempotent": idempotent
|
39
|
+
}
|
38
40
|
}
|
39
41
|
}),
|
40
42
|
timeout=30,
|
@@ -51,8 +53,10 @@ class ToolsManager:
|
|
51
53
|
response = await self.router.send(
|
52
54
|
"tool:unregister",
|
53
55
|
Serializable[dict[str, Any]]({
|
54
|
-
"
|
55
|
-
|
56
|
+
"data": {
|
57
|
+
"catalog": catalog_name,
|
58
|
+
"tool_id": tool_id
|
59
|
+
}
|
56
60
|
}),
|
57
61
|
timeout=30,
|
58
62
|
expected_response=dict[str, Any]
|
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
|
{attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/interfaces/catalogs/tools/envelope.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{attp_client-0.0.5 → attp_client-0.0.7}/src/attp_client/interfaces/inference/enums/message_type.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
|