Skip to content

Commit

Permalink
Get context_max_tokens from retrieve_config if provided (#2259)
Browse files Browse the repository at this point in the history
Co-authored-by: Li Jiang <bnujli@gmail.com>
  • Loading branch information
r-b-g-b and thinkall committed Apr 4, 2024
1 parent 89f3cfd commit 513b0b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autogen/agentchat/contrib/retrieve_user_proxy_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def retrieve_docs(self, problem: str, n_results: int = 20, search_string: str =
self.custom_text_split_function = self._retrieve_config.get("custom_text_split_function", None)
self._custom_text_types = self._retrieve_config.get("custom_text_types", TEXT_FORMATS)
self._recursive = self._retrieve_config.get("recursive", True)
self._context_max_tokens = self._max_tokens * 0.8
self._context_max_tokens = self._retrieve_config.get("context_max_tokens", self._max_tokens * 0.8)
self._collection = True if self._docs_path is None else False # whether the collection is created
self._ipython = get_ipython()
self._doc_idx = -1 # the index of the current used doc
Expand Down

0 comments on commit 513b0b7

Please sign in to comment.