Embeddings: Add string input as an option
Used in OAI's API Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
f9fffd42e0
commit
b94c646210
1 changed files with 2 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from typing import List, Optional
|
||||
from typing import List, Optional, Union
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ class UsageInfo(BaseModel):
|
|||
|
||||
|
||||
class EmbeddingsRequest(BaseModel):
|
||||
input: List[str] = Field(
|
||||
input: Union[str, List[str]] = Field(
|
||||
..., description="List of input texts to generate embeddings for."
|
||||
)
|
||||
encoding_format: str = Field(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue