Skip to content

Commit f492987

Browse files
authored
Merge pull request #3299 from dargilco/dargilco/rename-to-agent-id
Update `assistant_id` to `agent_id`, when using Agents in azure-ai-projects SDK
2 parents b0f71df + 6775ce0 commit f492987

File tree

11 files changed

+13
-13
lines changed

11 files changed

+13
-13
lines changed

articles/ai-services/agents/how-to/tools/azure-functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ agent = project_client.agents.create_agent(
232232
```
233233

234234
# [REST API](#tab/rest)
235-
Follow the [REST API Quickstart](../../quickstart.md?pivots=rest-api) to set the right values for the environment variables `AZURE_AI_AGENTS_TOKEN` and `AZURE_AI_AGENTS_ENDPOINT`. The create the agent using:
235+
Follow the [REST API Quickstart](../../quickstart.md?pivots=rest-api) to set the right values for the environment variables `AZURE_AI_AGENTS_TOKEN` and `AZURE_AI_AGENTS_ENDPOINT`. Then create the agent using:
236236
```console
237237
curl $AZURE_AI_AGENTS_ENDPOINT/assistants?api-version=2024-12-01-preview \
238238
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN" \
@@ -309,7 +309,7 @@ message = project_client.agents.create_message(
309309
print(f"Created message, message ID: {message.id}")
310310

311311
# Run the agent
312-
run = project_client.agents.create_run(thread_id=thread.id, assistant_id=agent.id)
312+
run = project_client.agents.create_run(thread_id=thread.id, agent_id=agent.id)
313313
# Monitor and process the run status. The function call should be placed on the input queue by the Agent Service for the Azure Function to pick up when requires_action is returned
314314
while run.status in ["queued", "in_progress", "requires_action"]:
315315
time.sleep(1)

articles/ai-services/agents/how-to/tools/bing-grounding.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ Create a run and observe that the model uses the Grounding with Bing Search tool
344344

345345
```python
346346
# Create and process agent run in thread with tools
347-
run = project_client.agents.create_and_process_run(thread_id=thread.id, assistant_id=agent.id)
347+
run = project_client.agents.create_and_process_run(thread_id=thread.id, agent_id=agent.id)
348348
print(f"Run finished with status: {run.status}")
349349

350350
# Retrieve run step details to get Bing Search query link

articles/ai-services/agents/how-to/tools/code-interpreter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ message = project_client.agents.create_message(
260260
print(f"Created message, message ID: {message.id}")
261261

262262
# create and execute a run
263-
run = project_client.agents.create_and_process_run(thread_id=thread.id, assistant_id=agent.id)
263+
run = project_client.agents.create_and_process_run(thread_id=thread.id, agent_id=agent.id)
264264
print(f"Run finished with status: {run.status}")
265265

266266
if run.status == "failed":

articles/ai-services/agents/how-to/tools/function-calling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/messages?api-version=2024-1
369369

370370
```python
371371
# Create and process agent run in thread with tools
372-
run = project_client.agents.create_and_process_run(thread_id=thread.id, assistant_id=agent.id)
372+
run = project_client.agents.create_and_process_run(thread_id=thread.id, agent_id=agent.id)
373373
print(f"Run finished with status: {run.status}")
374374

375375
if run.status == "failed":

articles/ai-services/agents/how-to/tools/openapi-spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ Create a run and observe that the model uses the OpenAPI Spec tool to provide a
321321
print(f"Created message, ID: {message.id}")
322322

323323
# Create and process agent run in thread with tools
324-
run = project_client.agents.create_and_process_run(thread_id=thread.id, assistant_id=agent.id)
324+
run = project_client.agents.create_and_process_run(thread_id=thread.id, agent_id=agent.id)
325325
print(f"Run finished with status: {run.status}")
326326

327327
if run.status == "failed":

articles/ai-services/agents/how-to/virtual-networks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ with project_client:
246246
print(f"Created message, message ID: {message.id}")
247247

248248
# Run the agent
249-
run = project_client.agents.create_and_process_run(thread_id=thread.id, assistant_id=agent.id)
249+
run = project_client.agents.create_and_process_run(thread_id=thread.id, agent_id=agent.id)
250250
print(f"Run finished with status: {run.status}")
251251

252252
if run.status == "failed":

articles/ai-services/agents/includes/azure-search/code-examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ message = project_client.agents.create_message(
262262
print(f"Created message, message ID: {message.id}")
263263

264264
# Run the agent
265-
run = project_client.agents.create_and_process_run(thread_id=thread.id, assistant_id=agent.id)
265+
run = project_client.agents.create_and_process_run(thread_id=thread.id, agent_id=agent.id)
266266
print(f"Run finished with status: {run.status}")
267267

268268
if run.status == "failed":

articles/ai-services/agents/includes/file-search/azure-blob-storage-code-examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ message = project_client.agents.create_message(
7878
)
7979
print(f"Created message, message ID: {message.id}")
8080

81-
run = project_client.agents.create_and_process_run(thread_id=thread.id, assistant_id=agent_1.id)
81+
run = project_client.agents.create_and_process_run(thread_id=thread.id, agent_id=agent_1.id)
8282

8383
project_client.agents.delete_vector_store(vector_store.id)
8484
print("Deleted vector store")

articles/ai-services/agents/includes/file-search/deep-dive.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ batch = project_client.agents.create_vector_store_file_batch_and_poll(
3838
Files can be removed from a vector store by either:
3939

4040
* Deleting the vector store file object or,
41-
* Deleting the underlying file object, which removes the file it from all vector_store and code_interpreter configurations across all agents and threads in your organization
41+
* Deleting the underlying file object, which removes the file from all vector_store and code_interpreter configurations across all agents and threads in your organization
4242

4343
The maximum file size is 512 MB. Each file should contain no more than 5,000,000 tokens per file (computed automatically when you attach a file).
4444

@@ -52,7 +52,7 @@ file_search_tool.remove_vector_store(vector_store.id)
5252
print(f"Removed vector store from file search, vector store ID: {vector_store.id}")
5353

5454
project_client.agents.update_agent(
55-
assistant_id=agent.id, tools=file_search_tool.definitions, tool_resources=file_search_tool.resources
55+
agent_id=agent.id, tools=file_search_tool.definitions, tool_resources=file_search_tool.resources
5656
)
5757
print(f"Updated agent, agent ID: {agent.id}")
5858

articles/ai-services/agents/includes/file-search/upload-files-code-examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/messages?api-version=2024-1
310310
Create a run and observe that the model uses the file search tool to provide a response to the user's question.
311311
# [Python](#tab/python)
312312
```python
313-
run = project_client.agents.create_and_process_run(thread_id=thread.id, assistant_id=agent.id)
313+
run = project_client.agents.create_and_process_run(thread_id=thread.id, agent_id=agent.id)
314314
print(f"Created run, run ID: {run.id}")
315315

316316
project_client.agents.delete_vector_store(vector_store.id)

0 commit comments

Comments
 (0)