Skip to content

Commit

Permalink
Improve docstring of query_texts and search_string (microsoft#795)
Browse files Browse the repository at this point in the history
* Improve docstring of query_texts and search_string

* Update docstring

* Update docstring
  • Loading branch information
thinkall authored Nov 29, 2023
1 parent 4fde121 commit 3c2a38e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions autogen/agentchat/contrib/qdrant_retrieve_user_proxy_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ def retrieve_docs(self, problem: str, n_results: int = 20, search_string: str =
"""
Args:
problem (str): the problem to be solved.
n_results (int): the number of results to be retrieved.
search_string (str): only docs containing this string will be retrieved.
n_results (int): the number of results to be retrieved. Default is 20.
search_string (str): only docs that contain an exact match of this string will be retrieved. Default is "".
"""
if not self._collection:
print("Trying to create collection.")
Expand Down
4 changes: 2 additions & 2 deletions autogen/agentchat/contrib/retrieve_user_proxy_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ def retrieve_docs(self, problem: str, n_results: int = 20, search_string: str =
Args:
problem (str): the problem to be solved.
n_results (int): the number of results to be retrieved.
search_string (str): only docs containing this string will be retrieved.
n_results (int): the number of results to be retrieved. Default is 20.
search_string (str): only docs that contain an exact match of this string will be retrieved. Default is "".
"""
if not self._collection or not self._get_or_create:
print("Trying to create collection.")
Expand Down
4 changes: 2 additions & 2 deletions autogen/retrieve_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,12 @@ def query_vector_db(
and query function.
Args:
query_texts (List[str]): the query texts.
query_texts (List[str]): the list of strings which will be used to query the vector db.
n_results (Optional, int): the number of results to return. Default is 10.
client (Optional, API): the chromadb compatible client. Default is None, a chromadb client will be used.
db_path (Optional, str): the path to the vector db. Default is "/tmp/chromadb.db".
collection_name (Optional, str): the name of the collection. Default is "all-my-documents".
search_string (Optional, str): the search string. Default is "".
search_string (Optional, str): the search string. Only docs that contain an exact match of this string will be retrieved. Default is "".
embedding_model (Optional, str): the embedding model to use. Default is "all-MiniLM-L6-v2". Will be ignored if
embedding_function is not None.
embedding_function (Optional, Callable): the embedding function to use. Default is None, SentenceTransformer with
Expand Down

0 comments on commit 3c2a38e

Please sign in to comment.