API: Fix exceptions and defaults

Stop conditions was None, causing model to error out when trying to
add the EOS token to a None value.

Authentication failed when Bearer contained an empty string. To fix
this, add a condition which checks array length.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri
2023-11-17 17:56:05 -05:00
parent 4669e49ff0
commit d627d14385
2 changed files with 9 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ class CommonCompletionRequest(BaseModel):
# Generation info
seed: Optional[int] = -1
stream: Optional[bool] = False
stop: Optional[Union[str, List[str]]] = None
stop: Optional[Union[str, List[str]]] = []
# Default to 150 as 16 makes no sense as a default
max_tokens: Optional[int] = 150