@@ -25,7 +25,7 @@ def embedding_search(
25
25
self ,
26
26
query_embedding : Embedding ,
27
27
k : Optional [int ] = None ,
28
- include_embedding : Optional [ bool ] = False ,
28
+ include_embedding : bool = False ,
29
29
** kwargs : Any ,
30
30
) -> List [Tuple [Chunk , float ]]:
31
31
"""Search for relevant text chunks based on a query embedding.
@@ -34,16 +34,16 @@ def embedding_search(
34
34
store, ranked by relevance or other metrics.
35
35
36
36
Args:
37
- query_embedding (Embedding) : The query embedding to search for relevant
37
+ query_embedding: The query embedding to search for relevant
38
38
text chunks.
39
- k (Optional[int]) : The number of top results to retrieve.
40
- include_embedding (Optional[bool]) : Optional (default False) flag to
39
+ k: The number of top results to retrieve.
40
+ include_embedding: Optional (default False) flag to
41
41
include the embedding vectors in the returned chunks
42
- **kwargs (Any) : Additional parameters that implementations might require
42
+ **kwargs: Additional parameters that implementations might require
43
43
for customized retrieval operations.
44
44
45
45
Returns:
46
- List[Tuple[Chunk, float]]: A list of retrieved Chunk, float Tuples,
46
+ A list of retrieved Chunk, float Tuples,
47
47
each representing a text chunk that is relevant to the query,
48
48
along with its similarity score.
49
49
"""
@@ -54,7 +54,7 @@ async def aembedding_search(
54
54
self ,
55
55
query_embedding : Embedding ,
56
56
k : Optional [int ] = None ,
57
- include_embedding : Optional [ bool ] = False ,
57
+ include_embedding : bool = False ,
58
58
** kwargs : Any ,
59
59
) -> List [Tuple [Chunk , float ]]:
60
60
"""Search for relevant text chunks based on a query embedding.
@@ -63,16 +63,16 @@ async def aembedding_search(
63
63
store, ranked by relevance or other metrics.
64
64
65
65
Args:
66
- query_embedding (Embedding) : The query embedding to search for relevant
66
+ query_embedding: The query embedding to search for relevant
67
67
text chunks.
68
- k (Optional[int]) : The number of top results to retrieve.
69
- include_embedding (Optional[bool]) : Optional (default False) flag to
68
+ k: The number of top results to retrieve.
69
+ include_embedding: Optional (default False) flag to
70
70
include the embedding vectors in the returned chunks
71
- **kwargs (Any) : Additional parameters that implementations might require
71
+ **kwargs: Additional parameters that implementations might require
72
72
for customized retrieval operations.
73
73
74
74
Returns:
75
- List[Tuple[Chunk, float]]: A list of retrieved Chunk, float Tuples,
75
+ A list of retrieved Chunk, float Tuples,
76
76
each representing a text chunk that is relevant to the query,
77
77
along with its similarity score.
78
78
"""
@@ -84,7 +84,7 @@ def text_search(
84
84
query_text : str ,
85
85
k : Optional [int ] = None ,
86
86
query_maxlen : Optional [int ] = None ,
87
- include_embedding : Optional [ bool ] = False ,
87
+ include_embedding : bool = False ,
88
88
** kwargs : Any ,
89
89
) -> List [Tuple [Chunk , float ]]:
90
90
"""Search for relevant text chunks based on a query text.
@@ -93,17 +93,17 @@ def text_search(
93
93
store, ranked by relevance or other metrics.
94
94
95
95
Args:
96
- query_text (str) : The query text to search for relevant text chunks.
97
- k (Optional[int]) : The number of top results to retrieve.
98
- query_maxlen (Optional[int]) : The maximum length of the query to consider.
96
+ query_text: The query text to search for relevant text chunks.
97
+ k: The number of top results to retrieve.
98
+ query_maxlen: The maximum length of the query to consider.
99
99
If None, the maxlen will be dynamically generated.
100
- include_embedding (Optional[bool]) : Optional (default False) flag to
100
+ include_embedding: Optional (default False) flag to
101
101
include the embedding vectors in the returned chunks
102
- **kwargs (Any) : Additional parameters that implementations might require
102
+ **kwargs: Additional parameters that implementations might require
103
103
for customized retrieval operations.
104
104
105
105
Returns:
106
- List[Tuple[Chunk, float]]: A list of retrieved Chunk, float Tuples,
106
+ A list of retrieved Chunk, float Tuples,
107
107
each representing a text chunk that is relevant to the query,
108
108
along with its similarity score.
109
109
"""
@@ -115,7 +115,7 @@ async def atext_search(
115
115
query_text : str ,
116
116
k : Optional [int ] = None ,
117
117
query_maxlen : Optional [int ] = None ,
118
- include_embedding : Optional [ bool ] = False ,
118
+ include_embedding : bool = False ,
119
119
** kwargs : Any ,
120
120
) -> List [Tuple [Chunk , float ]]:
121
121
"""Search for relevant text chunks based on a query text.
@@ -124,17 +124,17 @@ async def atext_search(
124
124
store, ranked by relevance or other metrics.
125
125
126
126
Args:
127
- query_text (str) : The query text to search for relevant text chunks.
128
- k (Optional[int]) : The number of top results to retrieve.
129
- query_maxlen (Optional[int]) : The maximum length of the query to consider.
127
+ query_text: The query text to search for relevant text chunks.
128
+ k: The number of top results to retrieve.
129
+ query_maxlen: The maximum length of the query to consider.
130
130
If None, the maxlen will be dynamically generated.
131
- include_embedding (Optional[bool]) : Optional (default False) flag to
131
+ include_embedding: Optional (default False) flag to
132
132
include the embedding vectors in the returned chunks
133
- **kwargs (Any) : Additional parameters that implementations might require
133
+ **kwargs: Additional parameters that implementations might require
134
134
for customized retrieval operations.
135
135
136
136
Returns:
137
- List[Tuple[Chunk, float]]: A list of retrieved Chunk, float Tuples,
137
+ A list of retrieved Chunk, float Tuples,
138
138
each representing a text chunk that is relevant to the query,
139
139
along with its similarity score.
140
140
"""
0 commit comments