Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server types: Move 'model' parameter to clarify it is used #1786

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions llama_cpp/server/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@


class CreateCompletionRequest(BaseModel):
model: Optional[str] = model_field
prompt: Union[str, List[str]] = Field(
default="", description="The prompt to generate completions for."
)
Expand Down Expand Up @@ -138,7 +139,6 @@ class CreateCompletionRequest(BaseModel):
seed: Optional[int] = Field(None)

# ignored or currently unsupported
model: Optional[str] = model_field
n: Optional[int] = 1
best_of: Optional[int] = 1
user: Optional[str] = Field(default=None)
Expand Down Expand Up @@ -190,6 +190,7 @@ class ChatCompletionRequestMessage(BaseModel):


class CreateChatCompletionRequest(BaseModel):
model: Optional[str] = model_field
messages: List[llama_cpp.ChatCompletionRequestMessage] = Field(
default=[], description="A list of messages to generate completions for."
)
Expand Down Expand Up @@ -237,7 +238,6 @@ class CreateChatCompletionRequest(BaseModel):
)

# ignored or currently unsupported
model: Optional[str] = model_field
n: Optional[int] = 1
user: Optional[str] = Field(None)

Expand Down