mirror of
https://github.com/abetlen/llama-cpp-python.git
synced 2023-09-07 17:34:22 +03:00
feat: make embedding support list of string as input
makes the /v1/embedding route similar to OpenAI api.
This commit is contained in:
@@ -275,7 +275,7 @@ def create_completion(
|
||||
|
||||
class CreateEmbeddingRequest(BaseModel):
|
||||
model: Optional[str] = model_field
|
||||
input: str = Field(description="The input to embed.")
|
||||
input: Union[str, List[str]] = Field(description="The input to embed.")
|
||||
user: Optional[str]
|
||||
|
||||
class Config:
|
||||
|
||||
Reference in New Issue
Block a user