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

bug: Additional properties are not allowed for azure oai #95

Open
Pixel-Pox opened this issue Dec 2, 2024 · 0 comments
Open

bug: Additional properties are not allowed for azure oai #95

Pixel-Pox opened this issue Dec 2, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Pixel-Pox
Copy link

What happened?

When querying dbally with azure openai creds, a wrong prompt template is used

Error code: 400 - {'error': {'message': "Additional properties are not allowed ('is_example' was unexpected) - 'messages.0'", 'type': 'invalid_request_error', 'param': None, 'code': None}}

This can be fixed by commenting out "is_example": message.get("is_example", False) in dbally.prompt.template -> PromptTemplate.format_prompt()... But ofc it should take into consideration other LiteLLM options.

How can we reproduce it?

import dbally
from dbally.audit import CLIEventHandler
from dbally.llms.litellm import LiteLLM

os.environ['LITELLM_LOG'] = 'DEBUG'

os.environ["AZURE_API_KEY"] = "actual-key"
os.environ["AZURE_API_BASE"] = "actual-url"
os.environ["AZURE_API_VERSION"] = "2024-08-01-preview"

llm = LiteLLM(model_name="azure/gpt-4")
my_collection = dbally.create_collection("my_collection", llm, event_handlers=[CLIEventHandler()])
my_collection.add(MyView, lambda: MyView(engine))
result = await my_collection.ask("which llm to use?")

Relevant log output

No response

@Pixel-Pox Pixel-Pox added the bug Something isn't working label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant