Skip to content

Commit

Permalink
Add debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
zMardone committed Nov 22, 2024
1 parent 9fd16be commit 6db03fd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions router/classifiers/chatgpt_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,20 @@ def predict(
classification = self.CLASSIFICATION_OTHER
return classification

print("[+ ChatGPT message function classification data +]")
print(f"Tools: {flows_list}")
print(f"Model: {self.chatgpt_model}")
print(f"Message: {msg}")

response = self.client.chat_completions_create(
model=self.chatgpt_model,
messages=msg,
tools=flows_list,
tool_choice="auto"
)
print("[+ ChatGPT message function classification response +]")
print(f"Response: {response}")
print("[++++++++++++++++++++++++++++++++++++++++++++++++]")

tool_calls = response.choices[0].message.tool_calls

Expand Down

0 comments on commit 6db03fd

Please sign in to comment.