Spaces:
Running
Running
Ankush Rana
commited on
Commit
·
0057ac1
1
Parent(s):
8e2ce4c
remove and add prints
Browse files
app.py
CHANGED
@@ -55,11 +55,6 @@ def completion(history, model, system_prompt: str, tools=None):
|
|
55 |
else:
|
56 |
messages.append({"role": msg.role, "content": msg.content})
|
57 |
|
58 |
-
for msg in messages:
|
59 |
-
print(msg)
|
60 |
-
|
61 |
-
print("")
|
62 |
-
print("")
|
63 |
request_params = {
|
64 |
"model": model,
|
65 |
"messages": messages,
|
@@ -112,6 +107,7 @@ def llm_in_loop(history, system_prompt, recursive):
|
|
112 |
history[-1].content += chunk.choices[0].delta.content
|
113 |
yield history[recursive:]
|
114 |
|
|
|
115 |
arguments = clean_json_string(arguments) if arguments else "{}"
|
116 |
print(name, arguments)
|
117 |
arguments = json.loads(arguments)
|
|
|
55 |
else:
|
56 |
messages.append({"role": msg.role, "content": msg.content})
|
57 |
|
|
|
|
|
|
|
|
|
|
|
58 |
request_params = {
|
59 |
"model": model,
|
60 |
"messages": messages,
|
|
|
107 |
history[-1].content += chunk.choices[0].delta.content
|
108 |
yield history[recursive:]
|
109 |
|
110 |
+
print("Before:", name, arguments)
|
111 |
arguments = clean_json_string(arguments) if arguments else "{}"
|
112 |
print(name, arguments)
|
113 |
arguments = json.loads(arguments)
|