Skip to content

Commit

Permalink
fix: tool_choice issue
Browse files Browse the repository at this point in the history
  • Loading branch information
luochen1990 committed Oct 10, 2024
1 parent e560aac commit 79bf5a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ai_powered/chat_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async def chat_continue(self) -> str:
model = model_config.model_name,
messages = [*self._system_prompts, *self.conversation],
tools = self._tool_schemas,
tool_choice = "auto" if len(self.tools) > 0 else "none",
tool_choice = "auto" if len(self.tools) > 0 else openai.NOT_GIVEN,
)
assistant_message = response.choices[0].message

Expand Down

0 comments on commit 79bf5a4

Please sign in to comment.