Skip to content

Commit

Permalink
Merge pull request #55 from plasma-umass/bugfix
Browse files Browse the repository at this point in the history
fix to tool_call crash
  • Loading branch information
stephenfreund authored Dec 21, 2024
2 parents 55a4f26 + 7e3fedf commit 0b5a0cb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/chatdbg/assistant/assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ def _streamed_query(self, prompt: str, user_text):
# has only tool calls, and skip this step
response_message = completion.choices[0].message
if response_message.content != None:
# fix: remove tool calls. They get added below.
response_message = response_message.copy()
response_message["tool_calls"] = None
self._conversation.append(response_message.json())

if response_message.content != None:
Expand Down

0 comments on commit 0b5a0cb

Please sign in to comment.