We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lines 18 and 34 of embedding_server/server.py can be modified to support both arrays and strings
This will match the OpenAI API spec: https://platform.openai.com/docs/api-reference/embeddings/create
The text was updated successfully, but these errors were encountered:
Suggested modifications:
class EmbeddingBody(BaseModel): input: str | list[str] = Field(description="Your text string goes here") # MODIFIED model: str | None = Field( default=None, title="model name. not in use", max_length=300 )
async def root(body: EmbeddingBody, Authorization: Optional[str] = Header(None)): ... sentences = body.input if isinstance(body.input, list) else [body.input] # MODIFIED
Sorry, something went wrong.
No branches or pull requests
Lines 18 and 34 of embedding_server/server.py can be modified to support both arrays and strings
This will match the OpenAI API spec:
https://platform.openai.com/docs/api-reference/embeddings/create
The text was updated successfully, but these errors were encountered: