Astra db
AstraDBReader #
Bases: BaseReader
Astra DB reader.
Retrieve documents from an Astra DB Instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
collection_name |
str
|
collection name to use. If not existing, it will be created. |
required |
token |
str
|
The Astra DB Application Token to use. |
required |
api_endpoint |
str
|
The Astra DB JSON API endpoint for your database. |
required |
embedding_dimension |
int
|
Length of the embedding vectors in use. |
required |
namespace |
Optional[str]
|
The namespace to use. If not provided, 'default_keyspace' |
None
|
client |
Optional[Any]
|
Astra DB client to use. If not provided, one will be created. |
None
|
Source code in llama-index-integrations/readers/llama-index-readers-astra-db/llama_index/readers/astra_db/base.py
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 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
|
load_data #
load_data(vector: List[float], limit: int = 10, **kwargs: Any) -> Any
Load data from Astra DB.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vector |
Any
|
Query |
required |
limit |
int
|
Number of results to return. |
10
|
kwargs |
Any
|
Additional arguments to pass to the Astra DB query. |
{}
|
Returns:
Type | Description |
---|---|
Any
|
List[Document]: A list of documents. |
Source code in llama-index-integrations/readers/llama-index-readers-astra-db/llama_index/readers/astra_db/base.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
|