From 6db03fdfe4a4558fb587fe7924340a4cfa5dcd30 Mon Sep 17 00:00:00 2001 From: Mardone Date: Fri, 22 Nov 2024 11:37:28 -0300 Subject: [PATCH] Add debug prints --- router/classifiers/chatgpt_function.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/router/classifiers/chatgpt_function.py b/router/classifiers/chatgpt_function.py index 94fc121f..4ee1156d 100644 --- a/router/classifiers/chatgpt_function.py +++ b/router/classifiers/chatgpt_function.py @@ -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