Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,6 @@ def clean_json_string(json_str):
|
|
29 |
|
30 |
def complation(history, model, system_prompt, tools=None):
|
31 |
messages = [{"role": "system", "content": system_prompt}]
|
32 |
-
print(history)
|
33 |
for msg in history:
|
34 |
if type(msg) == dict:
|
35 |
msg = ChatMessage(**msg)
|
@@ -39,9 +38,6 @@ def complation(history, model, system_prompt, tools=None):
|
|
39 |
messages.append({"role": "tool", "content": msg.content})
|
40 |
else:
|
41 |
messages.append({"role": msg.role, "content": msg.content})
|
42 |
-
print("================")
|
43 |
-
print(messages)
|
44 |
-
print("================")
|
45 |
if not tools:
|
46 |
return client.chat.completions.create(
|
47 |
model=model,
|
|
|
29 |
|
30 |
def complation(history, model, system_prompt, tools=None):
|
31 |
messages = [{"role": "system", "content": system_prompt}]
|
|
|
32 |
for msg in history:
|
33 |
if type(msg) == dict:
|
34 |
msg = ChatMessage(**msg)
|
|
|
38 |
messages.append({"role": "tool", "content": msg.content})
|
39 |
else:
|
40 |
messages.append({"role": msg.role, "content": msg.content})
|
|
|
|
|
|
|
41 |
if not tools:
|
42 |
return client.chat.completions.create(
|
43 |
model=model,
|