Loading...
Loading...
Compare original and translation side by side
scripts/scripts/azure-ai-projects==2.0.0b3
azure-ai-agents==1.1.0
azure-identity==1.25.1
azure-core==1.38.0
openai==2.16.0
PyYAML==6.0.3scripts/requirements.txtazazure-ai-projects==2.0.0b3
azure-ai-agents==1.1.0
azure-identity==1.25.1
azure-core==1.38.0
openai==2.16.0
PyYAML==6.0.3scripts/requirements.txtazundefinedundefined
**If dependencies are missing**, install them:
```bash
pip install -r requirements.txt
**若缺少依赖项,请执行以下命令安装:**
```bash
pip install -r requirements.txtundefinedundefinedscripts/create-agent.pytest-agent.pyundefinedscripts/create-agent.pytest-agent.pyundefinedundefinedundefined---
name: agent-name
description: Brief description of what the agent does
model: gpt-4o-mini # Optional hint - if not found, will prompt/deploy
---
System instructions for the agent go here.
These become the agent's system prompt.
Example instructions:
You are a helpful assistant that specializes in...namedescriptionmodelgpt-4ogpt-4o-miniassets/template-agent.yamlreferences/yaml-examples.md---
name: agent-name
description: Brief description of what the agent does
model: gpt-4o-mini # 可选提示 - 若未找到模型,将提示/部署模型
---
此处为Agent的系统指令。
这些内容将成为Agent的系统提示词。
示例指令:
你是一位专业的助手,擅长...namedescriptionmodelgpt-4ogpt-4o-miniassets/template-agent.yamlreferences/yaml-examples.mdcreate-agent.pyaz role assignment create --role "Azure AI User" --assignee "user@example.com" --scope /subscriptions/{sub-id}create-agent.pyaz role assignment create --role "Azure AI User" --assignee "user@example.com" --scope /subscriptions/{sub-id}--filterresource-name/project-name locationdeploy-azure-model.sh.agent.txtpython test-agent.py <agent-name> <endpoint>--filterresource-name/project-name locationdeploy-azure-model.sh.agent.txtpython test-agent.py <agent-name> <endpoint>undefinedundefinedundefinedundefinedundefinedundefined
**Test session features:**
- Interactive chat loop
- Type 'exit' or 'quit' to end
- Ctrl+C to interrupt
- Prints Python code sample after conversation
**测试会话功能:**
- 交互式聊天循环
- 输入'exit'或'quit'结束会话
- 按Ctrl+C中断
- 会话结束后打印Python代码示例.agent.txtfrom azure.ai.projects import AIProjectClient
from azure.identity import DefaultAzureCredential
client = AIProjectClient(
endpoint="https://resource.services.ai.azure.com/api/projects/project",
credential=DefaultAzureCredential(),
)
openai_client = client.get_openai_client()
response = openai_client.responses.create(
input=[{"role": "user", "content": "Your message"}],
extra_body={"agent": {"name": "agent-name", "type": "agent_reference"}},
)
print(response.output_text).agent.txtfrom azure.ai.projects import AIProjectClient
from azure.identity import DefaultAzureCredential
client = AIProjectClient(
endpoint="https://resource.services.ai.azure.com/api/projects/project",
credential=DefaultAzureCredential(),
)
openai_client = client.get_openai_client()
response = openai_client.responses.create(
input=[{"role": "user", "content": "Your message"}],
extra_body={"agent": {"name": "agent-name", "type": "agent_reference"}},
)
print(response.output_text)./setup-azure-ai.sh myproject swedencentralrg-myprojectmyproject-resourcemyproject-project./setup-azure-ai.sh myproject swedencentralrg-myprojectmyproject-resourcemyproject-projectundefinedundefined
Features:
- Lists available models by region
- Checks quota (GlobalStandard/Standard)
- Configurable capacity (TPM)
- Can select existing deployments
功能特性:
- 按区域列出可用模型
- 检查配额(GlobalStandard/Standard)
- 可配置容量(TPM)
- 可选择现有部署.agents/skills/hosted-agents-v2-py/.agents/skills/hosted-agents-v2-py/az loginDefaultAzureCredential()az loginDefaultAzureCredential()azure-ai-projects==2.0.0b3AgentDefinitionazure-ai-projects==2.0.0b3AgentDefinitionreferences/troubleshooting.mdreferences/troubleshooting.md__init__.pyyaml_parser.pyagent_builder.pyazure_discovery.py__init__.pyyaml_parser.pyagent_builder.pyazure_discovery.pyhelpful-assistant.yamlcode-reviewer.yamlmath-tutor.yamldata-analyst.yamlpirate-captain.yamlhelpful-assistant.yamlcode-reviewer.yamlmath-tutor.yamldata-analyst.yamlpirate-captain.yamlscripts/scripts/