Skip to content

Pinecone

Configure your own Pinecone instance as data sink.

pinecone

```python from llama_cloud.types import CloudPineconeVectorStore

ds = { ‘name’: '', ‘sink_type’: ‘PINECONE’, ‘component’: CloudPineconeVectorStore( api_key=‘<api_key>’, index_name=‘<index_name>’, name_space=‘<name_space>’, # optional insert_kwargs=‘<insert_kwargs>’ # optional ) } data_sink = client.data_sinks.create_data_sink(request=ds)

</TabItem>
<TabItem value="typescript" label="TypeScript Client" default>
```Typescript
const ds = {
'name': 'pinecone',
'sinkType': 'PINECONE',
'component': {
'api_key': '<api_key>',
'index_name': '<index_name>',
'name_space': '<name_space>', // optional
'insert_kwargs': '<insert_kwargs>' // optional
}
}
data_sink = await client.dataSinks.createDataSink({
projectId: projectId,
body: ds
})

When using Pinecone as a data sink, you can apply filters using the following syntax:

Filter OperatorPinecone EquivalentDescription
==$eqEquals
!=$neNot equal
>$gtGreater than
<$ltLess than
>=$gteGreater than or equal
<=$lteLess than or equal
in$inValue is in a list
nin$ninValue is not in a list

These filters can be applied to metadata fields when querying your Pinecone index to refine search results based on specific criteria.