mirror of
https://github.com/katanemo/plano.git
synced 2026-05-18 13:45:15 +02:00
improve response handling (#71)
This commit is contained in:
parent
79b1c5415f
commit
eff4cd9826
7 changed files with 51 additions and 51 deletions
|
|
@ -33,8 +33,8 @@ def predict(message, history):
|
|||
# remove last user message in case of exception
|
||||
history.pop()
|
||||
log.info("CHAT_COMPLETION_ENDPOINT: ", CHAT_COMPLETION_ENDPOINT)
|
||||
log.info("Error with OpenAI API: {}".format(e.message))
|
||||
raise gr.Error("Error with OpenAI API: {}".format(e.message))
|
||||
log.info("Error calling gateway API: {}".format(e.message))
|
||||
raise gr.Error("Error calling gateway API: {}".format(e.message))
|
||||
|
||||
# for chunk in response:
|
||||
# if chunk.choices[0].delta.content is not None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue