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
Support any pydentic based models in endpoint arguments and return type:
class Message(BaseModel): .... class Response(BaseModel): ....
Expected behaviour fails:
@endpoint def generate(self, request: Message) -> Response: embedding = self.tokenizer.embedding_function.encode(request.content) return Response(embedding)
Workaround:
@endpoint def generate(self, request: Message) -> dict: request = Message.model_validate(request) embedding = self.tokenizer.embedding_function.encode(request.content) return {"response": embedding}
The text was updated successfully, but these errors were encountered:
steinerkelvin
No branches or pull requests
Support any pydentic based models in endpoint arguments and return type:
Expected behaviour fails:
Workaround:
The text was updated successfully, but these errors were encountered: