Skip to content

Commit 919b1d9

Browse files
committed
fix include_all_tools
1 parent ea4a75e commit 919b1d9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llms/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,8 +1073,9 @@ async def chat_completion(chat):
10731073
include_all_tools = False
10741074
only_tools = []
10751075
if "metadata" in chat:
1076-
only_tools = chat["metadata"].get("only_tools", "").split(",")
1077-
include_all_tools = only_tools == "all"
1076+
only_tools_str = chat["metadata"].get("only_tools", "")
1077+
include_all_tools = only_tools_str == "all"
1078+
only_tools = only_tools_str.split(",")
10781079

10791080
if include_all_tools or len(only_tools) > 0:
10801081
if "tools" not in current_chat:

0 commit comments

Comments
 (0)