Spaces:
Runtime error
Runtime error
Update app.py
Browse files12 unmodified lines131415161718192012 unmodified linesmessages.append({"role": "user", "content": message})response = client.chat_completion(messages,max_tokens=50, temperature=.9,top_p=.7) #changes the length of messagereturn response['choices'][0]['message']['content'].strip()12 unmodified lines1314151617181920212223242526272812 unmodified linesmessages.append({"role": "user", "content": message})response = ""for message in client.chat_completion(messages,max_tokens=50, stream=True):token = messages.choices[0].delta.contentresponse = += tokenyield response["choices"][0]["message"]["content"]#temperature=.9,#top_p=.7) #changes the length of messagereturn response['choices'][0]['message']['content'].strip()
app.py+10-2