semantic-router
semantic-router copied to clipboard
Documentation examples don't work with different LLM
I am using the semantic_router.encoders.AzureOpenAIEncoder and semantic_router.llms.AzureOpenAILLM.
When trying to reproduce the examples from docs/02-dynamic-routes.ipynb, but with those encoder/llm. When using semantic_route.llms.openai.get_schemas_openai, asking a RouteLayer will fail with a ValueError. (Logger says: 2024-06-05 18:14:46 ERROR semantic_router.utils.logger Single input validation error: 'signature') The error comes from semantic_router/llms/base.py:76 (in v0.0.46) where a 'signature' key is requested from the function schema.
When exchanging for semantic_router.utils.function_call.get_schema, the RouteChoice ouput is incomplete, missing the function name. Multi function routes don't work at all with this llm/encoder.