Skip to content

Commit

Permalink
remove ids
Browse files Browse the repository at this point in the history
  • Loading branch information
spikechroma committed Aug 23, 2024
1 parent 28ef4e0 commit 1649a25
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 18 deletions.
4 changes: 1 addition & 3 deletions docs/docs.trychroma.com/pages/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ collection.add(
documents=[
"This is a document about pineapple",
"This is a document about oranges"
],
ids=["id1", "id2"]
]
)
```

Expand All @@ -167,7 +166,6 @@ await client.addRecords(collection, {
"This is a document about pineapple",
"This is a document about oranges",
],
ids: ["id1", "id2"],
});
```

Expand Down
11 changes: 2 additions & 9 deletions docs/docs.trychroma.com/pages/guides/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ async def main():
collection = await client.create_collection(name="my_collection")

await collection.add(
documents=["hello world"],
ids=["id1"]
documents=["hello world"]
)

asyncio.run(main())
Expand Down Expand Up @@ -358,8 +357,7 @@ Raw documents:
```python
collection.add(
documents=["lorem ipsum...", "doc2", "doc3", ...],
metadatas=[{"chapter": "3", "verse": "16"}, {"chapter": "3", "verse": "5"}, {"chapter": "29", "verse": "11"}, ...],
ids=["id1", "id2", "id3", ...]
metadatas=[{"chapter": "3", "verse": "16"}, {"chapter": "3", "verse": "5"}, {"chapter": "29", "verse": "11"}, ...]
)
```

Expand All @@ -372,7 +370,6 @@ Raw documents:

```javascript
await client.addRecords(collection, {
ids: ["id1", "id2", "id3", ...],
metadatas: [{"chapter": "3", "verse": "16"}, {"chapter": "3", "verse": "5"}, {"chapter": "29", "verse": "11"}, ...],
documents: ["lorem ipsum...", "doc2", "doc3", ...],
})
Expand Down Expand Up @@ -401,7 +398,6 @@ collection.add(
documents=["doc1", "doc2", "doc3", ...],
embeddings=[[1.1, 2.3, 3.2], [4.5, 6.9, 4.4], [1.1, 2.3, 3.2], ...],
metadatas=[{"chapter": "3", "verse": "16"}, {"chapter": "3", "verse": "5"}, {"chapter": "29", "verse": "11"}, ...],
ids=["id1", "id2", "id3", ...]
)
```

Expand All @@ -410,7 +406,6 @@ collection.add(

```javascript
await client.addRecords(collection, {
ids: ["id1", "id2", "id3", ...],
embeddings: [[1.1, 2.3, 3.2], [4.5, 6.9, 4.4], [1.1, 2.3, 3.2], ...],
metadatas: [{"chapter": "3", "verse": "16"}, {"chapter": "3", "verse": "5"}, {"chapter": "29", "verse": "11"}, ...],
documents: ["lorem ipsum...", "doc2", "doc3", ...],
Expand All @@ -433,7 +428,6 @@ You can also store documents elsewhere, and just supply a list of `embeddings` a
collection.add(
embeddings=[[1.1, 2.3, 3.2], [4.5, 6.9, 4.4], [1.1, 2.3, 3.2], ...],
metadatas=[{"chapter": "3", "verse": "16"}, {"chapter": "3", "verse": "5"}, {"chapter": "29", "verse": "11"}, ...],
ids=["id1", "id2", "id3", ...]
)
```

Expand All @@ -442,7 +436,6 @@ collection.add(

```javascript
await client.addRecords(collection, {
ids: ["id1", "id2", "id3", ...],
embeddings: [[1.1, 2.3, 3.2], [4.5, 6.9, 4.4], [1.1, 2.3, 3.2], ...],
metadatas: [{"chapter": "3", "verse": "16"}, {"chapter": "3", "verse": "5"}, {"chapter": "29", "verse": "11"}, ...],
})
Expand Down
3 changes: 0 additions & 3 deletions docs/docs.trychroma.com/pages/guides/multimodal.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ You can add data to a multi-modal collection by specifying the data modality. Fo

```python
collection.add(
ids=['id1', 'id2', 'id3'],
images=[...] # A list of numpy arrays representing images
)
```
Expand All @@ -76,7 +75,6 @@ However, you can use Chroma in combination with data stored elsewhere, by adding

```python
collection.add(
ids=['id1', 'id2', 'id3'],
uris=[...] # A list of strings representing URIs to data
)
```
Expand All @@ -85,7 +83,6 @@ Since the embedding function is multi-modal, you can also add text to the same c

```python
collection.add(
ids=['id4', 'id5', 'id6'],
texts=["This is a document", "This is another document", "This is a third document"]
)
```
Expand Down
3 changes: 0 additions & 3 deletions docs/docs.trychroma.com/pages/reference/cheatsheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,15 @@ collection.add(
embeddings=[1.5, 2.9, 3.4],
metadatas={"uri": "img9.png", "style": "style1"},
documents="doc1000101",
ids="uri9",
)
# or many, up to 100k+!
collection.add(
embeddings=[[1.5, 2.9, 3.4], [9.8, 2.3, 2.9]],
metadatas=[{"style": "style1"}, {"style": "style2"}],
ids=["uri9", "uri10"],
)
collection.add(
documents=["doc1000101", "doc288822"],
metadatas=[{"style": "style1"}, {"style": "style2"}],
ids=["uri9", "uri10"],
)

# update items in a collection
Expand Down

0 comments on commit 1649a25

Please sign in to comment.