Skip to content

Commit

Permalink
Embeddings: Add string input as an option
Browse files Browse the repository at this point in the history
Used in OAI's API

Signed-off-by: kingbri <[email protected]>
  • Loading branch information
bdashore3 committed Nov 17, 2024
1 parent f9fffd4 commit b94c646
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions endpoints/OAI/types/embedding.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Optional
from typing import List, Optional, Union

from pydantic import BaseModel, Field

Expand All @@ -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(
Expand Down

0 comments on commit b94c646

Please sign in to comment.