Is AsyncChatbot still work ?I want text replay in a stream way
I found squence reply text is flushed out at same time, I sure it worked in former version:
response = gptChatbot.get_chat_response(message['data'], output="stream")
for i, res in enumerate(response):
print(res['message'])
I found squence reply text is flushed out at same time, I sure it worked in former version:
response = gptChatbot.get_chat_response(message['data'], output="stream") for i, res in enumerate(response): print(res['message'])
I can work that way
I found squence reply text is flushed out at same time, I sure it worked in former version:
response = gptChatbot.get_chat_response(message['data'], output="stream") for i, res in enumerate(response): print(res['message'])I can work that way
You get a stream text in this way ?
Version updated so quickly....So can anyone gives a stanadard snippet demo on how to get stream text...pls
https://github.com/acheong08/ChatGPT/blob/6cc7dd974a0eaffc14d23ae978d9952206b724cf/src/revChatGPT/main.py#L142-L165
https://github.com/acheong08/ChatGPT/blob/6cc7dd974a0eaffc14d23ae978d9952206b724cf/src/revChatGPT/main.py#L142-L165 I 'm using socketio in flask. still I got :"name 'Chatbot_ "async_func_for_check'" is not defined": should I add "async await " or some what?
gptChatbot = Chatbot(config, conversation_id=None)
socketio = SocketIO(app, logger=True, engineio_logger=True, cors_allowed_origins="*", async_mode="eventlet")
@socketio.on('ask')
def message_handler(message):
print('received ask')
logging.info(message['data'])
try:
index = 0
response = gptChatbot.get_chat_response(message['data'], output="stream")
for res in response:
print(res['message'])
emit('answer', {
'data': res['message'],
'index': index,
'conversationID': res['conversation_id'],
'parentID': res['parent_id']
})
index += 1
except Exception as e:
emit('exception', {
'data': str(e),
'errorCode': 1000,
})
socketio.run(app, host='0.0.0.0', port=8001)
hello, have you successfully replayed the text in streaming mode?
yeah.but I encountered another BUG now.So, temporarily, I won't be able to replay it for now.
---Original--- From: @.> Date: Wed, Dec 14, 2022 19:48 PM To: @.>; Cc: "Jackie @.@.>; Subject: Re: [acheong08/ChatGPT] Is AsyncChatbot still work ?I want textreplay in a stream way (Issue #331)
hello, have you successfully replayed the text in streaming mode?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>