Server: format error to json (#5961)

* server: format error to json

* server: do not crash on grammar error

* fix api key test case

* revert limit max n_predict

* small fix

* correct coding style

* update completion.js

* launch_slot_with_task

* update docs

* update_slots

* update webui

* update readme
This commit is contained in:
Xuan Son Nguyen 2024-03-11 10:56:41 +01:00 committed by GitHub
parent 3202361c5b
commit caa106d4e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 430 additions and 317 deletions

View file

@ -801,7 +801,7 @@ async def oai_chat_completions(user_prompt,
stream=enable_streaming,
seed=seed
)
except openai.error.APIError as e:
except openai.error.AuthenticationError as e:
if expect_api_error is not None and expect_api_error:
return 401
else: