-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
A warning about using the AzureOpenAI is displayed in version 2.5.2. The recommendation is to use dspy.LM. I get the serialize exception when I change this the client from this:
from azure.identity import DefaultAzureCredential, get_bearer_token_provider
token_provider = get_bearer_token_provider(
DefaultAzureCredential(), "https://cognitiveservices.azure.com/.default"
)
model=os.environ["AZURE_AI_MODEL_GPT_4o"]
llm_gpt_4o = dspy.LM(
model="gpt-4o"
api_version=os.environ["OPENAI_API_VERSION"],
api_base=os.environ["AZURE_OPENAI_ENDPOINT"],
azure_ad_token_provider=token_provider,
max_tokens=3000,
)to this:
llm_gpt_4o = dspy.LM(
model=os.environ["AZURE_AI_MODEL_GPT_4o"],
api_version=os.environ["OPENAI_API_VERSION"],
api_base=os.environ["AZURE_OPENAI_ENDPOINT"],
azure_ad_token_provider=token_provider,
max_tokens=3000,
)Metadata
Metadata
Assignees
Labels
No labels