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

Using Azure token provider in dspy.LM #1759

Closed
bahtman opened this issue Nov 5, 2024 · 0 comments · Fixed by #1896 · May be fixed by #1862
Closed

Using Azure token provider in dspy.LM #1759

bahtman opened this issue Nov 5, 2024 · 0 comments · Fixed by #1896 · May be fixed by #1862

Comments

@bahtman
Copy link

bahtman commented Nov 5, 2024

A good practice when authenticating with Azure OpenAI is using token providers.
Following then example of:
https://docs.litellm.ai/docs/providers/azure#azure-ad-token-refresh---defaultazurecredential

The reason for token provider vs. getting token is that the token expires with some time limit.

We get a type error that the token provider is not JSON serializable.
image

This was also experienced by @arthurgreef in #1561 (comment).
Although "fixed" by getting the token instead of providing the callable that handles refreshing of tokens.

I assume this is a byproduct of caching, but the behaviour is still present with cache=False parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant