Ivy1997 commited on
Commit
0066452
·
verified ·
1 Parent(s): f2209b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -14
app.py CHANGED
@@ -71,20 +71,8 @@ def respond(
71
  else:
72
  messages.append({"role": "user", "content": message})
73
 
74
- payload = {
75
- "messages": messages,
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