Skip to content
New issue

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

OpenAI BadRequestError: '$.input' is invalid in semantic_router OpenAI encoder #530

Open
xRME-18 opened this issue Feb 10, 2025 · 0 comments

Comments

@xRME-18
Copy link

xRME-18 commented Feb 10, 2025

I'm encountering a BadRequestError from OpenAI's embeddings API while using semantic_router in my Python project. The error message suggests that '$.input' is invalid

openai.BadRequestError: Error code: 400 - {'error': {'message': "'$.input' is invalid. Please check the API reference: https://platform.openai.com/docs/api-reference.", 'type': 'invalid_request_error', 'param': None, 'code': None}}

` message_string = get_buffer_string(last_human_messsages, human_prefix="")

routes = create_routes(agents_rules)

rl = RouteLayer(encoder=encoder, routes=routes)

next_agent = rl(message_string)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant