support for stop array

This commit is contained in:
josc146
2023-07-25 16:10:22 +08:00
parent 05b9b42b56
commit 34095a6c36
2 changed files with 37 additions and 17 deletions

View File

@@ -25,7 +25,7 @@ class ChatCompletionBody(ModelConfigBody):
messages: List[Message]
model: str = "rwkv"
stream: bool = False
stop: str = None
stop: str | List[str] = None
class Config:
schema_extra = {
@@ -47,7 +47,7 @@ class CompletionBody(ModelConfigBody):
prompt: Union[str, List[str]]
model: str = "rwkv"
stream: bool = False
stop: str = None
stop: str | List[str] = None
class Config:
schema_extra = {