Skip to content
Snippets Groups Projects
Unverified Commit 4e8e7267 authored by James Briggs's avatar James Briggs
Browse files

fix for loading routes in pinecone

parent ce5d3eed
No related branches found
No related tags found
No related merge requests found
...@@ -156,10 +156,12 @@ class PineconeIndex(BaseIndex): ...@@ -156,10 +156,12 @@ class PineconeIndex(BaseIndex):
# Make the request to list vectors. Adjust headers and parameters as needed. # Make the request to list vectors. Adjust headers and parameters as needed.
response = requests.get(list_url, params=params, headers=headers) response = requests.get(list_url, params=params, headers=headers)
response_data = response.json() response_data = response.json()
print(response_data)
# Extract vector IDs from the response and add them to the list # Extract vector IDs from the response and add them to the list
vector_ids = [vec["id"] for vec in response_data.get("vectors", [])] vector_ids = [vec["id"] for vec in response_data.get("vectors", [])]
# check that there are vector IDs, otherwise break the loop
if not vector_ids:
break
all_vector_ids.extend(vector_ids) all_vector_ids.extend(vector_ids)
# if we need metadata, we fetch it # if we need metadata, we fetch it
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment