Update maker.py
Browse files
maker.py
CHANGED
@@ -69,18 +69,19 @@ def predict_beta(message, chatbot=[], system_prompt=system_prompt, max_new_token
|
|
69 |
advanced,
|
70 |
fn_index=0
|
71 |
)
|
72 |
-
print("Raw API Response:", result)
|
73 |
if result is not None and len(result) > 0:
|
74 |
bot_message = result[0]
|
75 |
-
print(bot_message)
|
76 |
return bot_message
|
77 |
else:
|
78 |
raise gr.Error("No response received from the model.")
|
79 |
|
80 |
except Exception as e:
|
81 |
error_msg = f"An error occurred: {str(e)}"
|
|
|
82 |
raise gr.Error(error_msg)
|
83 |
-
|
84 |
def extract_title_prompt_example(text):
|
85 |
default_title = "Custom GPT Agent"
|
86 |
default_system_prompt = "This is a custom GPT agent."
|
|
|
69 |
advanced,
|
70 |
fn_index=0
|
71 |
)
|
72 |
+
print("Raw API Response:", result) # Debugging print
|
73 |
if result is not None and len(result) > 0:
|
74 |
bot_message = result[0]
|
75 |
+
print("Processed bot_message:", bot_message) # Debugging print
|
76 |
return bot_message
|
77 |
else:
|
78 |
raise gr.Error("No response received from the model.")
|
79 |
|
80 |
except Exception as e:
|
81 |
error_msg = f"An error occurred: {str(e)}"
|
82 |
+
print("Error in predict_beta:", error_msg) # Debugging print
|
83 |
raise gr.Error(error_msg)
|
84 |
+
|
85 |
def extract_title_prompt_example(text):
|
86 |
default_title = "Custom GPT Agent"
|
87 |
default_system_prompt = "This is a custom GPT agent."
|