add reply to davinci
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Pavel_Durov 2023-07-17 23:39:33 +03:00
parent 8fc70c267d
commit cbd8e13d79

View File

@ -25,5 +25,20 @@ async def send(message: types.Message):
)
await message.reply(response['choices'][0]['text'])
elif message.reply_to_message.bot:
response = openai.Completion.create(
model="text-davinci-003",
prompt=message.text,
temperature=0.7,
max_tokens=1000,
top_p=1.0,
frequency_penalty=0.0,
presence_penalty=0.6,
stop=["сброс"]
)
await message.reply(response['choices'][0]['text'])