[Frontend] Support embeddings in the run_batch API (#7132)

Co-authored-by: Simon Mo <simon.mo@hey.com>
This commit is contained in:
Pooya Davoodi
2024-08-09 09:48:21 -07:00
committed by GitHub
co-authored by Simon Mo
parent 74af2bbd90
commit 249b88228d
5 changed files with 138 additions and 24 deletions
+2 -2
View File
@@ -672,7 +672,7 @@ class BatchRequestInput(OpenAIBaseModel):
url: str
# The parameters of the request.
body: ChatCompletionRequest
body: Union[ChatCompletionRequest, EmbeddingRequest]
class BatchResponseData(OpenAIBaseModel):
@@ -683,7 +683,7 @@ class BatchResponseData(OpenAIBaseModel):
request_id: str
# The body of the response.
body: Optional[ChatCompletionResponse] = None
body: Optional[Union[ChatCompletionResponse, EmbeddingResponse]] = None
class BatchRequestOutput(OpenAIBaseModel):