Spaces:
Sleeping
Sleeping
more parameters for chat_completion
Browse files16 unmodified lines1718192021222316 unmodified linesmessages.append({'role': 'user','content': message})response = client.chat_completion(messages, max_tokens = 100)#max tokens is a parameter to determine how long the message should bereturn response['choices'][0]['message']['content'].strip()16 unmodified lines1718192021222316 unmodified linesmessages.append({'role': 'user','content': message})response = client.chat_completion(messages, max_tokens = 500, top_p=0.8)#max tokens is a parameter to determine how long the message should bereturn response['choices'][0]['message']['content'].strip()
app.py+1-1