mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-29 18:51:53 +00:00
Embeddings: Add string input as an option
Used in OAI's API Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
from typing import List, Optional
|
from typing import List, Optional, Union
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ class UsageInfo(BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
class EmbeddingsRequest(BaseModel):
|
class EmbeddingsRequest(BaseModel):
|
||||||
input: List[str] = Field(
|
input: Union[str, List[str]] = Field(
|
||||||
..., description="List of input texts to generate embeddings for."
|
..., description="List of input texts to generate embeddings for."
|
||||||
)
|
)
|
||||||
encoding_format: str = Field(
|
encoding_format: str = Field(
|
||||||
|
|||||||
Reference in New Issue
Block a user