Skip to content

Commit 0d0d865

Browse files
committed
Added parallel_tool_calls config
1 parent 96c6a69 commit 0d0d865

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

databao/configs/llm.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ class LLMConfig(BaseModel):
5252
agent_recursion_limit: int = 50
5353
"""Maximum recursion depth for LLM agent execution."""
5454

55+
parallel_tool_calls: bool = True
56+
"""Whether agent is allowed to call several tools in one response."""
57+
5558
model_config = ConfigDict(frozen=True, extra="forbid")
5659

5760
def _resolve_timeout(self) -> float | None:

databao/executors/lighthouse/graph.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,9 @@ def compile(self, model_config: LLMConfig) -> CompiledStateGraph[Any]:
156156
tools = self.make_tools()
157157
llm_model = model_config.new_chat_model()
158158

159-
model_with_tools = self._model_bind_tools(llm_model, tools)
159+
model_with_tools = self._model_bind_tools(
160+
llm_model, tools, parallel_tool_calls=model_config.parallel_tool_calls
161+
)
160162

161163
def llm_node(state: AgentState) -> dict[str, Any]:
162164
messages = state["messages"]

0 commit comments

Comments
 (0)