Chroma
ChromaDocumentWriter
Bases: Writer
, BaseWriterVectorStoreParams
Document Writer Node using Chroma Vector Store.
This class represents a node for writing documents to a Chroma Vector Store.
Attributes:
Name | Type | Description |
---|---|---|
group |
Literal[WRITERS]
|
The group the node belongs to. |
name |
str
|
The name of the node. |
connection |
Chroma | None
|
The connection to the Chroma Vector Store. |
vector_store |
ChromaVectorStore | None
|
The Chroma Vector Store instance. |
Source code in dynamiq/nodes/writers/chroma.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
|
__init__(**kwargs)
Initialize the ChromaDocumentWriter.
If neither vector_store nor connection is provided in kwargs, a default Chroma connection will be created.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs |
Arbitrary keyword arguments. |
{}
|
Source code in dynamiq/nodes/writers/chroma.py
26 27 28 29 30 31 32 33 34 35 36 37 |
|
execute(input_data, config=None, **kwargs)
Execute the document writing operation.
This method writes the documents provided in the input_data to the Chroma Vector Store.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input_data |
WriterInputSchema
|
An instance containing the input data. Expected to have a 'documents' key with the documents to be written. |
required |
config |
RunnableConfig
|
Configuration for the execution. |
None
|
**kwargs |
Additional keyword arguments. |
{}
|
Returns:
Name | Type | Description |
---|---|---|
dict |
A dictionary containing the count of upserted documents. |
Source code in dynamiq/nodes/writers/chroma.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
|