Skip to content

Commit efd87b3

Browse files
authored
Merge pull request #3252 from MicrosoftDocs/repo_sync_working_branch
Confirm merge from repo_sync_working_branch to main to sync with https://github.com/MicrosoftDocs/azure-ai-docs (branch main)
2 parents 46c21b2 + 7b7daf1 commit efd87b3

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

articles/ai-services/agents/how-to/tools/file-search.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ The maximum file size is 512 MB. Each file should contain no more than 5,000,000
8787

8888
We highly recommend that you ensure all files in a vector_store are fully processed before you create a run. This ensures that all the data in your vector store is searchable. You can check for vector store readiness by using the polling helpers in the SDKs, or by manually polling the vector store object to ensure the status is completed.
8989

90-
As a fallback, there's a 60-second maximum wait in the run object when the thread's vector store contains files that are still being processed. This is to ensure that any files your users upload in a thread a fully searchable before the run proceeds. This fallback wait does not apply to the agent's vector store.
90+
As a fallback, there's a 60-second maximum wait in the run object when the thread's vector store contains files that are still being processed. This is to ensure that any files your users upload in a thread are fully searchable before the run proceeds. This fallback wait does not apply to the agent's vector store.
9191

9292
## Add file search to an agent using the Azure AI Foundry portal
9393

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

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,19 @@ Get the connection ID of the Azure AI Search connection in the project. You can
8585

8686
```python
8787
# AI Search resource connection ID
88-
# This code prints out the connection ID of all the Azure AI Search connections in the project
89-
# If you have more than one AI search connection, make sure to select the correct one that contains the index you want to use.
90-
conn_list = project_client.connections.list()
88+
# This code looks for the AI Search Connection ID and saves it as variable conn_id
89+
90+
# If you have more than one AI search connection, try to establish the value in your .env file.
91+
# Extract the connection list.
92+
conn_list = project_client.connections._list_connections()["value"]
9193
conn_id = ""
94+
95+
# Search in the metadata field of each connection in the list for the azure_ai_search type and get the id value to establish the variable
9296
for conn in conn_list:
93-
if conn.connection_type == "AZURE_AI_SEARCH":
94-
print(f"Connection ID: {conn.id}")
97+
metadata = conn["properties"].get("metadata", {})
98+
if metadata.get("type", "").upper() == "AZURE_AI_SEARCH":
99+
conn_id = conn["id"]
100+
break
95101
```
96102
# [C#](#tab/csharp)
97103
```csharp
@@ -429,4 +435,4 @@ curl $AZURE_AI_AGENTS_ENDPOINT/threads/thread_abc123/messages?api-version=2024-1
429435
-H "Authorization: Bearer $AZURE_AI_AGENTS_TOKEN"
430436
```
431437
432-
---
438+
---

0 commit comments

Comments
 (0)