agnt5 0.2.2__cp39-abi3-macosx_11_0_arm64.whl → 0.2.3__cp39-abi3-macosx_11_0_arm64.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.
Potentially problematic release.
This version of agnt5 might be problematic. Click here for more details.
agnt5/_core.abi3.so
CHANGED
|
Binary file
|
agnt5/lm.py
CHANGED
|
@@ -277,8 +277,9 @@ class _LanguageModel:
|
|
|
277
277
|
# if request.tool_choice:
|
|
278
278
|
# kwargs["tool_choice"] = request.tool_choice.value
|
|
279
279
|
|
|
280
|
-
# Call Rust implementation
|
|
281
|
-
|
|
280
|
+
# Call Rust implementation - it returns a proper Python coroutine now
|
|
281
|
+
# Using pyo3-async-runtimes for truly async HTTP calls without blocking
|
|
282
|
+
rust_response = await self._rust_lm.generate(prompt=prompt, **kwargs)
|
|
282
283
|
|
|
283
284
|
# Convert Rust response to Python
|
|
284
285
|
return self._convert_response(rust_response)
|
|
@@ -326,8 +327,9 @@ class _LanguageModel:
|
|
|
326
327
|
# if request.tool_choice:
|
|
327
328
|
# kwargs["tool_choice"] = request.tool_choice.value
|
|
328
329
|
|
|
329
|
-
# Call Rust implementation
|
|
330
|
-
|
|
330
|
+
# Call Rust implementation - it returns a proper Python coroutine now
|
|
331
|
+
# Using pyo3-async-runtimes for truly async streaming without blocking
|
|
332
|
+
rust_chunks = await self._rust_lm.stream(prompt=prompt, **kwargs)
|
|
331
333
|
|
|
332
334
|
# Yield each chunk
|
|
333
335
|
for chunk in rust_chunks:
|
agnt5/worker.py
CHANGED
|
@@ -305,67 +305,66 @@ class Worker:
|
|
|
305
305
|
"""Create the message handler that will be called by Rust worker."""
|
|
306
306
|
|
|
307
307
|
def handle_message(request):
|
|
308
|
-
"""Handle incoming execution requests."""
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
)
|
|
308
|
+
"""Handle incoming execution requests - returns coroutine for Rust to await."""
|
|
309
|
+
# Extract request details
|
|
310
|
+
component_name = request.component_name
|
|
311
|
+
component_type = request.component_type
|
|
312
|
+
input_data = request.input_data
|
|
313
|
+
|
|
314
|
+
logger.debug(
|
|
315
|
+
f"Handling {component_type} request: {component_name}, input size: {len(input_data)} bytes"
|
|
316
|
+
)
|
|
318
317
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
318
|
+
# Import all registries
|
|
319
|
+
from .tool import ToolRegistry
|
|
320
|
+
from .entity import EntityRegistry
|
|
321
|
+
from .agent import AgentRegistry
|
|
322
|
+
|
|
323
|
+
# Route based on component type and return coroutines
|
|
324
|
+
if component_type == "tool":
|
|
325
|
+
tool = ToolRegistry.get(component_name)
|
|
326
|
+
if tool:
|
|
327
|
+
logger.debug(f"Found tool: {component_name}")
|
|
328
|
+
# Return coroutine, don't await it
|
|
329
|
+
return self._execute_tool(tool, input_data, request)
|
|
330
|
+
|
|
331
|
+
elif component_type == "entity":
|
|
332
|
+
entity_type = EntityRegistry.get(component_name)
|
|
333
|
+
if entity_type:
|
|
334
|
+
logger.debug(f"Found entity: {component_name}")
|
|
335
|
+
# Return coroutine, don't await it
|
|
336
|
+
return self._execute_entity(entity_type, input_data, request)
|
|
337
|
+
|
|
338
|
+
elif component_type == "agent":
|
|
339
|
+
agent = AgentRegistry.get(component_name)
|
|
340
|
+
if agent:
|
|
341
|
+
logger.debug(f"Found agent: {component_name}")
|
|
342
|
+
# Return coroutine, don't await it
|
|
343
|
+
return self._execute_agent(agent, input_data, request)
|
|
344
|
+
|
|
345
|
+
elif component_type == "workflow":
|
|
346
|
+
workflow_config = WorkflowRegistry.get(component_name)
|
|
347
|
+
if workflow_config:
|
|
348
|
+
logger.debug(f"Found workflow: {component_name}")
|
|
349
|
+
# Return coroutine, don't await it
|
|
350
|
+
return self._execute_workflow(workflow_config, input_data, request)
|
|
351
|
+
|
|
352
|
+
elif component_type == "function":
|
|
353
|
+
function_config = FunctionRegistry.get(component_name)
|
|
354
|
+
if function_config:
|
|
355
|
+
logger.info(f"🔥 WORKER: Received request for function: {component_name}")
|
|
356
|
+
# Return coroutine, don't await it
|
|
357
|
+
return self._execute_function(function_config, input_data, request)
|
|
358
|
+
|
|
359
|
+
# Not found - need to return an async error response
|
|
360
|
+
error_msg = f"Component '{component_name}' of type '{component_type}' not found"
|
|
361
|
+
logger.error(error_msg)
|
|
362
|
+
|
|
363
|
+
# Create async wrapper for error response
|
|
364
|
+
async def error_response():
|
|
363
365
|
return self._create_error_response(request, error_msg)
|
|
364
366
|
|
|
365
|
-
|
|
366
|
-
error_msg = f"Handler error: {e}"
|
|
367
|
-
logger.error(error_msg, exc_info=True)
|
|
368
|
-
return self._create_error_response(request, error_msg)
|
|
367
|
+
return error_response()
|
|
369
368
|
|
|
370
369
|
return handle_message
|
|
371
370
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
agnt5-0.2.
|
|
2
|
-
agnt5-0.2.
|
|
1
|
+
agnt5-0.2.3.dist-info/METADATA,sha256=vqyABE681kP5zw7uwyqo_LLKPtgv7-KLBP-IcDW5xD4,965
|
|
2
|
+
agnt5-0.2.3.dist-info/WHEEL,sha256=vpqC0tRn_8bTHidvtrPbrnFQPZnrhuKzsjDdeKwCd58,102
|
|
3
3
|
agnt5/__init__.py,sha256=dQ83SuDrAU83leQ38mDVdthZFP0SWJMK67xq1d4uGtg,1933
|
|
4
4
|
agnt5/_compat.py,sha256=BGuy3v5VDOHVa5f3Z-C22iMN19lAt0mPmXwF3qSSWxI,369
|
|
5
|
-
agnt5/_core.abi3.so,sha256=
|
|
5
|
+
agnt5/_core.abi3.so,sha256=xzAeLfCVjH22YDGMB10y_u_C_HGUxyf5pxw-2TJHEIo,12011968
|
|
6
6
|
agnt5/_telemetry.py,sha256=ZeABlTMoEnXYnBFVOn6ruaSvfeS7r_czI_Pk_tiCfhY,4899
|
|
7
7
|
agnt5/agent.py,sha256=sU0qSZyXl_D6YrQKxtlyR6gggPJ0zZKC63bWtJvMzJI,26557
|
|
8
8
|
agnt5/client.py,sha256=Zesl-TIie8Gwq-ajTauPlAsF7jZm5TPk307iHdxQ2SM,21214
|
|
@@ -10,10 +10,10 @@ agnt5/context.py,sha256=fF_eL_rY-GFnGFpL6wqPERykluGf2obpD-mYrGpsUTc,23817
|
|
|
10
10
|
agnt5/entity.py,sha256=kLMBlHSQJeRqNwfWcXeLcM5UF9JcU8aET6TQBh6tSBA,43966
|
|
11
11
|
agnt5/exceptions.py,sha256=mZ0q-NK6OKhYxgwBJpIbgpgzk-CJaFIHDbp1EE-pS7I,925
|
|
12
12
|
agnt5/function.py,sha256=hH7rH9c_ZohUuNoLlBJHuiR5qPhw0L0pkrVVrpL_g2M,11273
|
|
13
|
-
agnt5/lm.py,sha256=
|
|
13
|
+
agnt5/lm.py,sha256=ryEYWAD9KOszN9EjUX33_d2RGVqIYXn5xwqo4f4DRxg,19142
|
|
14
14
|
agnt5/tool.py,sha256=5s0YK5-BFIlQNUJOQHbejQsWW17r43rAC4zRvJnh9qg,12513
|
|
15
15
|
agnt5/types.py,sha256=Zb71ZMwvrt1p4SH18cAKunp2y5tao_W5_jGYaPDejQo,2840
|
|
16
16
|
agnt5/version.py,sha256=rOq1mObLihnnKgKqBrwZA0zwOPudEKVFcW1a48ynkqc,573
|
|
17
|
-
agnt5/worker.py,sha256=
|
|
17
|
+
agnt5/worker.py,sha256=fCgJdT2gUrTctr1d3FvU8v1eQIyZ_jhm2xRatI7Qga0,31356
|
|
18
18
|
agnt5/workflow.py,sha256=1sFAvtdZn6n7nDDb0YyE6LGJGuN2KVFNVo9Q42N_7_k,4529
|
|
19
|
-
agnt5-0.2.
|
|
19
|
+
agnt5-0.2.3.dist-info/RECORD,,
|
|
File without changes
|