You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update README.md to reflect changes in tool calling syntax
- Modified the description of tool usage to replace `auto_tool_call=True` with `call_tools=True` for clarity.
- Updated example code to demonstrate the new syntax for invoking tools in the LLM class.
* update
* update
* rename
* fix ci
Tools allow models to get real-world data or take actions. In LitAI, there is no magic with tool use, agents can decide to call tools (`auto_tool_call=True`), or you can manually call a tool with `llm.call_tool(...)` for full control. Zero magic, just plain Python.
136
+
Tools allow models to get real-world data or take actions. In LitAI, there is no magic with tool use, agents can decide to call tools (`auto_tool_calls=True`), or you can manually call a tool with `llm.call_tool(...)` for full control. Zero magic, just plain Python.
chosen_tool = llm.chat("What's the weather in Tokyo?", tools=[get_weather])
147
+
result = llm.chat("What's the weather in Tokyo?", tools=[get_weather], auto_tool_calls=True)
148
+
# The weather in Tokyo is sunny
148
149
150
+
chosen_tool = llm.chat("What's the weather in Tokyo?", tools=[get_weather])
149
151
result = llm.call_tool(chosen_tool, tools=[get_weather])
150
152
# The weather in London is sunny
151
153
```
152
154
153
-
Choose automatic or manual tool calling based on production needs. `auto_tool_call=True` is great for quick demos, but can obscure when and why a tool runs which can lead to surprises in production. `llm.call_tool(...)` gives you full control to decide when tools execute, making it easier to log, debug, test, and audit. This clarity is critical for reliability, safety, and trust in real-world systems.
155
+
Choose automatic or manual tool calling based on production needs. `auto_tool_calls=True` is great for quick demos, but can obscure when and why a tool runs which can lead to surprises in production. `llm.call_tool(...)` gives you full control to decide when tools execute, making it easier to log, debug, test, and audit. This clarity is critical for reliability, safety, and trust in real-world systems.
0 commit comments