mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-17 15:22:10 +00:00
Test czy upgrade do długich modeli się udał.
This commit is contained in:
@@ -529,6 +529,7 @@ async def check():
|
|||||||
|
|
||||||
|
|
||||||
# trunk-ignore(pylint/R0913)
|
# trunk-ignore(pylint/R0913)
|
||||||
|
# trunk-ignore(pylint/R0915)
|
||||||
async def handle_response(prompt, vykidailo, bartender, history, username, music):
|
async def handle_response(prompt, vykidailo, bartender, history, username, music):
|
||||||
"""
|
"""
|
||||||
Handle responses by appending them to a history, use OpenAI to
|
Handle responses by appending them to a history, use OpenAI to
|
||||||
@@ -575,14 +576,14 @@ async def handle_response(prompt, vykidailo, bartender, history, username, music
|
|||||||
# * extend bo 20 ostatnich
|
# * extend bo 20 ostatnich
|
||||||
if music:
|
if music:
|
||||||
history.append(message_table_muzyka[0])
|
history.append(message_table_muzyka[0])
|
||||||
history.extend(message_table_muzyka[-15:])
|
history.extend(message_table_muzyka[-25:])
|
||||||
response = await openai.ChatCompletion.acreate(
|
response = await openai.ChatCompletion.acreate(
|
||||||
model="gpt-4-32k", messages=history
|
model="gpt-4-32k", messages=history
|
||||||
)
|
)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
history.append(MESSAGE_TABLE[0])
|
history.append(MESSAGE_TABLE[0])
|
||||||
history.extend(MESSAGE_TABLE[-15:])
|
history.extend(MESSAGE_TABLE[-25:])
|
||||||
response = await openai.ChatCompletion.acreate(
|
response = await openai.ChatCompletion.acreate(
|
||||||
model="gpt-3.5-turbo-16k", messages=history
|
model="gpt-3.5-turbo-16k", messages=history
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user