Awadb
AwadbReader #
Bases: BaseReader
Awadb reader.
Retrieves documents through an existing awadb client. These documents can then be used in a downstream LlamaIndex data structure.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
client
|
client
|
An awadb client. |
required |
Source code in llama-index-integrations/readers/llama-index-readers-awadb/llama_index/readers/awadb/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 |
|
load_data #
load_data(query: ndarray, k: int = 4, separate_documents: bool = True) -> List[Document]
Load data from Faiss.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
ndarray
|
A 2D numpy array of query vectors. |
required |
k
|
int
|
Number of nearest neighbors to retrieve. Defaults to 4. |
4
|
separate_documents
|
Optional[bool]
|
Whether to return separate documents. Defaults to True. |
True
|
Returns:
Type | Description |
---|---|
List[Document]
|
List[Document]: A list of documents. |
Source code in llama-index-integrations/readers/llama-index-readers-awadb/llama_index/readers/awadb/base.py
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 |
|