-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
Description
Azure open ai agent session error
When I try to pass the session from agent.get_session to azure agent, it fails with an error about unexpected conversation id.
Code Sample
import asyncio
from agent_framework import InMemoryHistoryProvider
from agent_framework.azure import AzureOpenAIChatClient
from dotenv import load_dotenv
load_dotenv()
agent = AzureOpenAIChatClient().as_agent(
name="StorageAgent",
instructions="You are a helpful assistant.",
context_providers=[InMemoryHistoryProvider("memory",load_messages=True)],
)
async def main():
session_id = "12345"
while True:
session = agent.get_session(service_session_id=session_id)
message = input("You: ")
if message == "exit":
break
response = await agent.run(message, session=session)
if __name__ == "__main__":
asyncio.run(main())Error Messages / Stack Traces
agent_framework.exceptions.ChatClientException: <class 'agent_framework.azure._chat_client.AzureOpenAIChatClient'> service failed to complete the prompt: AsyncCompletions.create() got an unexpected keyword argument 'conversation_id'Package Versions
name = "agent-framework-core"
version = "1.0.0rc1"
Python Version
3.13
Additional Context
No response
Reactions are currently unavailable