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:
parent
3202361c5b
commit
caa106d4e0
6 changed files with 430 additions and 317 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue