set typing
parent
2a39686d43
commit
715e866430
|
@ -76,12 +76,12 @@ async def on_message(message):
|
||||||
await message.channel.send('What can I do for you?', reference=message)
|
await message.channel.send('What can I do for you?', reference=message)
|
||||||
return
|
return
|
||||||
|
|
||||||
await message.add_reaction('🤔')
|
|
||||||
response = None
|
|
||||||
|
|
||||||
# TODO: discord has a 2000 character limit, so we need to split the response
|
# TODO: discord has a 2000 character limit, so we need to split the response
|
||||||
|
response = None
|
||||||
buffer = ''
|
buffer = ''
|
||||||
response_content = ''
|
response_content = ''
|
||||||
|
async with message.channel.typing():
|
||||||
|
await message.add_reaction('🤔')
|
||||||
async for chunk in generate_response(raw_content, **load_session(message.reference)):
|
async for chunk in generate_response(raw_content, **load_session(message.reference)):
|
||||||
if chunk['done']:
|
if chunk['done']:
|
||||||
response_content += buffer
|
response_content += buffer
|
||||||
|
|
Loading…
Reference in New Issue