-
Notifications
You must be signed in to change notification settings - Fork 1k
Labels
agentsIssues related to single agentsIssues related to single agentspythonv1.0Features being tracked for the version 1.0 GAFeatures being tracked for the version 1.0 GA
Description
Hello,
I've been playing with the Agent Framework, and built the simplest ChatAgent just to test the format of content filtering in the agent.run() result.
Using a demo example from the guardrail testing in Azure AI Foundry portal, i can see the content filtering trigger as expected :
Running the exact same prompt to my basic agent, i actually retrieve an information, no content-filtering triggered, same AI Foundry Project, model and content-filtering configurations :
Here's the code behind :
@app.route('/ask', methods=['POST'])
async def ask():
data = request.get_json()
try:
model = Query(**data)
async with (
AzureCliCredential() as credential,
ChatAgent(
chat_client=AzureAIAgentClient(async_credential=credential),
instructions="You are a helpful assistant."
) as agent,
):
await agent.chat_client.setup_azure_ai_observability(enable_sensitive_data=True)
result = await agent.run(model.query)
return jsonify({
'query': model.query,
'sessionId': model.sessionId,
'answer': result.text
})Am I missing something ?
Thanks !
Metadata
Metadata
Assignees
Labels
agentsIssues related to single agentsIssues related to single agentspythonv1.0Features being tracked for the version 1.0 GAFeatures being tracked for the version 1.0 GA
Type
Projects
Status
Done