mirror of
https://github.com/fauxpilot/fauxpilot.git
synced 2025-08-20 05:14:10 -07:00
Some minor ergonomic changes for python backend
- Add validation rule to ensure is set to fastertransformer or python-backend - Add warning if model is unavailable, likely the user has not set correctly Signed-off-by: Parth Thakkar <thakkarparth007@gmail.com>
This commit is contained in:
parent
8df5058c5c
commit
4bf40cdb6c
3 changed files with 14 additions and 7 deletions
|
@ -1,10 +1,10 @@
|
|||
from typing import Optional, Union
|
||||
|
||||
from pydantic import BaseModel
|
||||
from pydantic import BaseModel, constr
|
||||
|
||||
|
||||
class OpenAIinput(BaseModel):
|
||||
model: str = "fastertransformer"
|
||||
model: constr(regex="^(fastertransformer|py-model)$") = "fastertransformer"
|
||||
prompt: Optional[str]
|
||||
suffix: Optional[str]
|
||||
max_tokens: Optional[int] = 16
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue