Skip to content

Commit

Permalink
Merge pull request #15 from ruaanviljoen/patch-1
Browse files Browse the repository at this point in the history
Update collections.md to fix syntax error for generating ID list
  • Loading branch information
tazarov authored Jul 10, 2024
2 parents 792fcfe + 4c1709f commit d9eb430
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/core/collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ client = chromadb.PersistentClient(path="my_local_data") # or HttpClient()

collection = client.get_or_create_collection("local_collection")
collection.add(
ids=[f"i" for i in range(1000)],
ids=[f"{i}" for i in range(1000)],
documents=[f"document {i}" for i in range(1000)],
metadatas=[{"doc_id": i} for i in range(1000)])
existing_count = collection.count()
Expand Down Expand Up @@ -381,4 +381,4 @@ client = chromadb.PersistentClient(path="test")
col = client.get_or_create_collection("my_collection")
ids_only_result = col.get(include=[])
print(ids_only_result['ids'])
```
```

0 comments on commit d9eb430

Please sign in to comment.