Skip to content

07-agent-framework #101

@hupseb

Description

@hupseb

Hi there,

the instructions do not fit the code in the repo...
https://microsoftlearning.github.io/mslearn-ai-agents/Instructions/Exercises/07-agent-framework.html

And... the async part was not working...

Create a client and initialize an agent with the tool and instructions

async with (
AzureCliCredential() as credential,
Agent(
client=AzureOpenAIResponsesClient(
credential=credential,
deployment_name=os.getenv("MODEL_DEPLOYMENT_NAME"),
project_endpoint=os.getenv("PROJECT_ENDPOINT"),
),
instructions="""You are an AI assistant for expense claim submission.
At the user's request, create an expense claim and use the plug-in function to send an email to expenses@contoso.com with the subject 'Expense Claim`and a body that contains itemized expenses with a total.
Then confirm to the user that you've done so. Don't ask for any more information from the user, just use the data provided to create the email.""",
tools=[submit_claim],
) as agent,
):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions