From 11f082e41728d19803d5412dda880090d000764a Mon Sep 17 00:00:00 2001 From: Felipe Ferreira Date: Fri, 15 Dec 2023 00:26:16 -0300 Subject: [PATCH] [OpenAI Extension] Add more types to Embeddings Endpoint (#4895) --- extensions/openai/typing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/openai/typing.py b/extensions/openai/typing.py index 332a8c28..3a212dd9 100644 --- a/extensions/openai/typing.py +++ b/extensions/openai/typing.py @@ -120,7 +120,7 @@ class ChatCompletionResponse(BaseModel): class EmbeddingsRequest(BaseModel): - input: str | List[str] + input: str | List[str] | List[int] | List[List[int]] model: str | None = Field(default=None, description="Unused parameter. To change the model, set the OPENEDAI_EMBEDDING_MODEL and OPENEDAI_EMBEDDING_DEVICE environment variables before starting the server.") encoding_format: str = Field(default="float", description="Can be float or base64.") user: str | None = Field(default=None, description="Unused parameter.")