Skip to content

Commit e2369d8

Browse files
authored
Update assistant_id to agent_id, when using Agents in azure-ai-projects SDK (#209)
1 parent 41bdb9e commit e2369d8

File tree

10 files changed

+11
-11
lines changed

10 files changed

+11
-11
lines changed

scenarios/Agents/samples/README.md

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

282282
# Run the agent
283-
run = project_client.agents.create_and_process_run(thread_id=thread.id, assistant_id=agent.id)
283+
run = project_client.agents.create_and_process_run(thread_id=thread.id, agent_id=agent.id)
284284
print(f"Run finished with status: {run.status}")
285285

286286
if run.status == "failed":

scenarios/Agents/samples/bing-search/bing-python.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
print(f"Created message, ID: {message.id}")
7272

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

7777
if run.status == "failed":

scenarios/Agents/samples/code-interpreter/python-code-interpreter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
print(f"Created message, message ID: {message.id}")
7373

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

7878
if run.status == "failed":

scenarios/Agents/samples/function-calling/python-function-calling-streaming.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def on_unhandled_event(self, event_type: str, event_data: Union[str, Dict[str, a
7474
print(f"Created message, message ID {message.id}")
7575

7676
with project_client.agents.create_stream(
77-
thread_id=thread.id, assistant_id=agent.id, event_handler=MyEventHandler()
77+
thread_id=thread.id, agent_id=agent.id, event_handler=MyEventHandler()
7878
) as stream:
7979
stream.until_done()
8080

scenarios/Agents/samples/function-calling/python-function-calling-toolset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
print(f"Created message, ID: {message.id}")
4545

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

5050
if run.status == "failed":

scenarios/Agents/samples/function-calling/python-function-calling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
)
3838
print(f"Created message, ID: {message.id}")
3939

40-
run = project_client.agents.create_run(thread_id=thread.id, assistant_id=agent.id)
40+
run = project_client.agents.create_run(thread_id=thread.id, agent_id=agent.id)
4141
print(f"Created run, ID: {run.id}")
4242

4343
while run.status in ["queued", "in_progress", "requires_action"]:

scenarios/Agents/samples/investment_advisor/agent-investment_advisor.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@
450450
"try:\n",
451451
" run = agents_client.create_run(\n",
452452
" thread_id=thread.id,\n",
453-
" assistant_id=agent.id,\n",
453+
" agent_id=agent.id,\n",
454454
" instructions=prompt_content,\n",
455455
" )\n",
456456
" print(\"Run started:\", run.id)\n",
@@ -636,7 +636,7 @@
636636
" # Initiate the Agent's response\n",
637637
" run = agents_client.create_run(\n",
638638
" thread_id=thread_id,\n",
639-
" assistant_id=agent.id,\n",
639+
" agent_id=agent.id,\n",
640640
" instructions=prompt_message,\n",
641641
" )\n",
642642
" print(\"Run started...\") #:\", run)\n",

scenarios/Agents/samples/quickstart.md

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

272272
# Run the agent
273-
run = project_client.agents.create_and_process_run(thread_id=thread.id, assistant_id=agent.id)
273+
run = project_client.agents.create_and_process_run(thread_id=thread.id, agent_id=agent.id)
274274
print(f"Run finished with status: {run.status}")
275275

276276
if run.status == "failed":

scenarios/Agents/samples/sales-analyst/agent-sales-analyst.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@
450450
"try:\n",
451451
" run = agent_client.create_and_process_run(\n",
452452
" thread_id=thread.id,\n",
453-
" assistant_id=agent.id,\n",
453+
" agent_id=agent.id,\n",
454454
" )\n",
455455
" print(\"Run started:\", run.id)\n",
456456
"except Exception as e:\n",

scenarios/projects/basic/agents.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
message = project.agents.create_message(
3737
thread_id=thread.id, role="user", content="Hello, what Contoso products do you know?"
3838
)
39-
run = project.agents.create_and_process_run(thread_id=thread.id, assistant_id=agent.id)
39+
run = project.agents.create_and_process_run(thread_id=thread.id, agent_id=agent.id)
4040
if run.status == "failed":
4141
print(f"Run failed: {run.last_error}")
4242
exit()

0 commit comments

Comments
 (0)