Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -71,20 +71,8 @@ def respond(
|
|
71 |
else:
|
72 |
messages.append({"role": "user", "content": message})
|
73 |
|
74 |
-
|
75 |
-
|
76 |
-
"max_tokens": max_tokens,
|
77 |
-
"temperature": temperature,
|
78 |
-
"top_p": top_p,
|
79 |
-
}
|
80 |
-
|
81 |
-
response = ""
|
82 |
-
for message in client.chat_completion(
|
83 |
-
payload,
|
84 |
-
stream=True,
|
85 |
-
):
|
86 |
-
token = message.choices[0].delta.content
|
87 |
-
response += token
|
88 |
|
89 |
yield response
|
90 |
|
|
|
71 |
else:
|
72 |
messages.append({"role": "user", "content": message})
|
73 |
|
74 |
+
# Simulating a response as `client.chat_completion` is not defined in this script
|
75 |
+
response = "Simulated response based on input: " + message
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
yield response
|
78 |
|