文件历史

6 次代码提交

作者 SHA1 备注 提交日期
Rohit P 7d24433049 Add async tool execution
Add Tools.aexecute_tool, which awaits async def tool callables and runs
blocking sync tools in a worker thread via asyncio.to_thread. The per-call
work (argument validation, policy evaluation, trace events, and tool-result
message building) is factored into shared helpers, so the sync execute_tool
and the new async path stay in lockstep with no duplicated tool-loop logic.
2026-06-23 10:34:43 +02:00
Rakesh Utekar 3289cb3455 fix(tools): generate valid schemas for complex annotations (#317)
Use Pydantic JSON Schema output for callable tool parameters so annotations like list[str], dict[str, int], and optionals do not fall back to invalid stringified JSON Schema types.
2026-06-18 11:31:20 -07:00
Rohit P dd9752d381 Fix linter issues.
Lint / lint (push) Has been cancelled
Lint / build_and_test (3.10) (push) Has been cancelled
Lint / build_and_test (3.11) (push) Has been cancelled
Lint / build_and_test (3.12) (push) Has been cancelled
2025-11-10 11:55:48 -08:00
Rohit P 7f9b57a034 Fix issues in tool schema conversation from MCP to JSON Spec
The issues was due to loss of information when converting
from MCP tool spec to python callable to OpenAI spec.
Keeping the original schema intact to prevent the loss
between intermediate conversions.
2025-11-10 06:16:49 -08:00
Rohit Prasad 51198e1edd Add abstraction for tool calling with max_turns. (#199)
Simpler abstraction for tool calling.
2025-02-15 08:43:52 -08:00
Rohit Prasad bd6b23fd72 Tool calling support. Part I (#102)
Add tool calling support for most providers.
OpenAI, Groq, Anthropic, AWS, Mistral, SambaNova,
Cohere, xAI, Gemini & Azure.
2025-01-23 20:13:50 -08:00