remove print statements
Browse files
app.py
CHANGED
@@ -26,9 +26,7 @@ def create_client(api_key=None):
|
|
26 |
def chat_with_ai(message, chat_history, system_prompt):
|
27 |
"""Formats the chat history for the API call."""
|
28 |
messages = [{"role": "system", "content": system_prompt}]
|
29 |
-
print(type(chat_history))
|
30 |
for tup in chat_history:
|
31 |
-
print(type(tup))
|
32 |
first_key = list(tup.keys())[0] # First key
|
33 |
last_key = list(tup.keys())[-1] # Last key
|
34 |
messages.append({"role": "user", "content": tup[first_key]})
|
|
|
26 |
def chat_with_ai(message, chat_history, system_prompt):
|
27 |
"""Formats the chat history for the API call."""
|
28 |
messages = [{"role": "system", "content": system_prompt}]
|
|
|
29 |
for tup in chat_history:
|
|
|
30 |
first_key = list(tup.keys())[0] # First key
|
31 |
last_key = list(tup.keys())[-1] # Last key
|
32 |
messages.append({"role": "user", "content": tup[first_key]})
|