Skip to content

Commit d6f3adc

Browse files
committed
removing untested code
1 parent 2bff713 commit d6f3adc

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

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

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,4 @@ vector_store = project_client.agents.create_vector_store_and_poll(
9595

9696
Vector stores created using thread helpers (like `tool_resources.file_search.vector_stores` in Threads or `message.attachments` in Messages) have a default expiration policy of seven days after they were last active (defined as the last time the vector store was part of a run).
9797

98-
When a vector store expires, the runs on that thread fail. To fix this issue, you can recreate a new vector_store with the same files and reattach it to the thread.
99-
100-
```python
101-
all_files = list(client.beta.vector_stores.files.list("vs_expired"))
102-
103-
vector_store = client.beta.vector_stores.create(name="rag-store")
104-
client.beta.threads.update(
105-
"thread_abc123",
106-
tool_resources={"file_search": {"vector_store_ids": [vector_store.id]}},
107-
)
108-
109-
for file_batch in chunked(all_files, 100):
110-
client.beta.vector_stores.file_batches.create_and_poll(
111-
vector_store_id=vector_store.id, file_ids=[file.id for file in file_batch]
112-
)
113-
```
98+
When a vector store expires, the runs on that thread fail. To fix this issue, you can recreate a new vector_store with the same files and reattach it to the thread.

0 commit comments

Comments
 (0)