mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 08:33:20 +00:00
less token less issues
This commit is contained in:
@@ -170,7 +170,7 @@ def complete_stream(question, docsearch, chat_history, api_key):
|
|||||||
messages_combine.append({"role": "system", "content": i["response"]})
|
messages_combine.append({"role": "system", "content": i["response"]})
|
||||||
messages_combine.append({"role": "user", "content": question})
|
messages_combine.append({"role": "user", "content": question})
|
||||||
completion = openai.ChatCompletion.create(model="gpt-3.5-turbo",
|
completion = openai.ChatCompletion.create(model="gpt-3.5-turbo",
|
||||||
messages=messages_combine, stream=True, max_tokens=1000, temperature=0)
|
messages=messages_combine, stream=True, max_tokens=500, temperature=0)
|
||||||
|
|
||||||
for line in completion:
|
for line in completion:
|
||||||
if 'content' in line['choices'][0]['delta']:
|
if 'content' in line['choices'][0]['delta']:
|
||||||
|
|||||||
Reference in New Issue
Block a user