This commit is contained in:
josc146 2023-09-15 16:31:14 +08:00
parent df969fcfc6
commit d7dcc90008
2 changed files with 4 additions and 3 deletions

1
.gitignore vendored
View File

@ -26,3 +26,4 @@ __pycache__
train_log.txt train_log.txt
finetune/json2binidx_tool/data finetune/json2binidx_tool/data
/wsl.state /wsl.state
/components

View File

@ -40,7 +40,7 @@ default_stop = [
class ChatCompletionBody(ModelConfigBody): class ChatCompletionBody(ModelConfigBody):
messages: Union[List[Message], None] messages: Union[List[Message], None]
model: str = "rwkv" model: Union[str, None] = "rwkv"
stream: bool = False stream: bool = False
stop: Union[str, List[str], None] = default_stop stop: Union[str, List[str], None] = default_stop
user_name: Union[str, None] = Field(None, description="Internal user name") user_name: Union[str, None] = Field(None, description="Internal user name")
@ -74,7 +74,7 @@ class ChatCompletionBody(ModelConfigBody):
class CompletionBody(ModelConfigBody): class CompletionBody(ModelConfigBody):
prompt: Union[str, List[str], None] prompt: Union[str, List[str], None]
model: str = "rwkv" model: Union[str, None] = "rwkv"
stream: bool = False stream: bool = False
stop: Union[str, List[str], None] = None stop: Union[str, List[str], None] = None
@ -368,7 +368,7 @@ async def completions(body: CompletionBody, request: Request):
class EmbeddingsBody(BaseModel): class EmbeddingsBody(BaseModel):
input: Union[str, List[str], List[List[int]], None] input: Union[str, List[str], List[List[int]], None]
model: str = "rwkv" model: Union[str, None] = "rwkv"
encoding_format: str = None encoding_format: str = None
fast_mode: bool = False fast_mode: bool = False