Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/aiwaves-cn/agents
/ functions
Functions
388 in github.com/aiwaves-cn/agents
⨍
Functions
388
◇
Types & classes
90
Method
__init__
(self, cfg_file: str, default_action: str = "read")
src/agents/tools/mail.py:21
Method
__init__
(self, config_path_or_dict: Union[str, dict] = None)
src/agents/utils/config.py:10
Method
__init__
( self, model_type: EmbeddingModelType = EmbeddingModelType.SMALL_3, )
src/agents/utils/embeddings.py:111
Method
__init__
r"""Initializes the UnstructuredIO class and ensures the installed version of Unstructured library meets the minimum requirements.
src/agents/utils/unstructured_io.py:17
Method
__init__
( self, url_and_api_key: Optional[Tuple[str, str]] = None, vector_storage_local_path:
src/agents/utils/retrievers/auto_retriever.py:37
Method
__init__
(self)
src/agents/utils/retrievers/base.py:14
Method
__init__
r"""Initializes the retriever class with an optional embedding model. Args: embedding_model (Optional[BaseEmbedding]): The embedd
src/agents/utils/retrievers/vector_retriever.py:27
Method
__init__
( self, vector_dim: int, collection_name: Optional[str] = None, url_and_api_ke
src/agents/utils/storages/vectordb_storages/qdrant.py:65
Method
__init__
( self, vector_dim: int, url_and_api_key: Tuple[str, str], collection_name: Op
src/agents/utils/storages/vectordb_storages/milvus.py:42
Method
__init__
(self)
src/agents/utils/storages/key_value_storages/in_memory.py:13
Method
__init__
(self, path: Optional[Path] = None)
src/agents/utils/storages/key_value_storages/json.py:18
Method
__init__
(self, config_path_or_dict: Union[str, dict] = None)
src/agents/task/task.py:29
Method
__init__
(self, config_path_or_dict: Union[str, dict] = None)
src/agents/task/node.py:37
Method
__init__
(self, config_path_or_dict: Union[str, dict] = None)
src/agents/task/node.py:188
Method
__init__
(self, config_path_or_dict: Union[str, dict] = None)
src/agents/task/sop.py:37
Method
__init__
(self, config_path_or_dict: Union[str, dict] = None)
src/agents/task/solution.py:33
Method
__init__
Initializes the LossCalculator object. Args: config (LossConfig): The loss configuration. has_ground_truth (
src/agents/optimization/loss.py:35
Method
__init__
Initializes the TaskSetting object. Args: **kwargs: Arbitrary keyword arguments for initializing the task se
src/agents/optimization/optimizer.py:25
Method
__init__
Initializes the OptimizerConfig object. Args: config_path_or_dict (str or dict): The path to the configuration file or t
src/agents/optimization/optimizer.py:35
Method
__init__
Initializes the NodeOptimizerConfig object. Args: config_path (str): The path to the configuration file.
src/agents/optimization/node_optimizer.py:25
Method
__init__
(self, config_path)
src/agents/optimization/sop_optimizer.py:28
Method
__init__
(self, config_path_or_dict)
src/agents/optimization/toolkit_optimizer.py:12
Method
__init__
(self, config_path)
src/agents/optimization/prompt_optimizer.py:36
Method
__init__
(self, config_path_or_dict)
src/agents/optimization/trainer.py:29
Method
__init__
Initialize the dataset by loading text data from a file. Args: file_name (str): The name of the text file containing creativ
src/agents/datasets/creative_writing.py:29
Method
__init__
Initializes a dataset instance for HumanEval, loading data from a JSON file specified in the configuration.
src/agents/datasets/humaneval.py:131
Method
__init__
(self, split: str = "train")
src/agents/datasets/hotpotqa.py:56
Method
__init__
Initialize the dataset with a list of data items. Args: data (List[Any]): A list of data items.
src/agents/datasets/base.py:12
Method
__init__
(self)
src/agents/datasets/software_dev.py:12
Method
__init__
Initializes a dataset instance for MATH problems, loading data from the specified directory structure. Args: split (str)
src/agents/datasets/math.py:31
Method
__init__
(self, config_path_or_dict: Union[str, dict])
src/agents/knowledge_bases/knowledge_base.py:29
Method
__init__
Initializes a State object. Args: node (Node): The node associated with this state. agent (Agent): The agent
src/agents/evaluation/state.py:9
Method
__init__
Initializes the StateBackward object. Args: **kwargs: Arbitrary keyword arguments for initializing the backward informat
src/agents/evaluation/state.py:121
Method
__init__
Initializes the NodeEval object. Args: node_name (str): The name of the node. prompt (str): The prompt used
src/agents/evaluation/state.py:169
Method
__init__
Initializes a Case object from a JSON dict. Args: json_data (dict): The JSON data to initialize the Case object.
src/agents/evaluation/case.py:24
Method
__init__
Initializes the evaluation results. Args: **kwargs: Arbitrary keyword arguments for initializing the evaluation results.
src/agents/evaluation/case.py:266
Method
__init__
Initializes the evaluation results. Args: **kwargs: Arbitrary keyword arguments for initializing the evaluation results.
src/agents/evaluation/case.py:314
Method
__init__
Initializes the SOP suggestion information. Args: **kwargs: Arbitrary keyword arguments for initializing the SOP suggest
src/agents/evaluation/case.py:363
Method
__init__
(self, state_list: list[State])
src/agents/evaluation/trajectory.py:7
Method
__init__
(self, config_path_or_dict: Union[str, dict] = None)
src/agents/agents/llm.py:52
Method
__init__
(self, config: LLMConfig)
src/agents/agents/llm.py:90
Method
__init__
(self)
src/agents/agents/memory.py:38
Method
__init__
( self, config: dict = {}, messages: list = [], storage: InMemoryKeyValueStora
src/agents/agents/memory.py:103
Method
__init__
( self, config: dict, json_path: str, chunk_list: list = [], storage:
src/agents/agents/memory.py:176
Method
__init__
(self, config_path_or_dict: Union[str, dict] = None)
src/agents/agents/environment.py:33
Method
__init__
(self, config_path_or_dict: Union[str, dict] = None)
src/agents/agents/agent.py:40
Method
__init__
(self, config_path_or_dict: Union[str, dict] = None)
src/agents/agents/agent_team.py:35
Method
__init__
(self, config_path_or_dict: Union[str, dict] = None)
src/agents/agents/action.py:43
Method
__init__
(self, config: dict, **kwargs)
src/agents/agents/toolkit.py:26
Method
__len__
(self)
src/agents/utils/storages/key_value_storages/in_memory.py:16
Method
__len__
Return the number of items in the dataset. Returns: The number of items.
src/agents/datasets/base.py:86
Method
__len__
(self)
src/agents/agents/memory.py:117
Method
_bing_search
Initialize search hyperparameters
src/agents/tools/web_search.py:42
Method
_google_search
Initialize search hyperparameters
src/agents/tools/web_search.py:68
Method
_read
(self, mail_dict: dict)
src/agents/tools/mail.py:106
Method
_send
(self, mail_dict: dict)
src/agents/tools/mail.py:259
Method
_serpapi_request
Initialize search hyperparameters
src/agents/tools/web_search.py:89
Method
action_history
(self)
src/agents/tools/web_browse.py:61
Method
add
r"""Saves a list of vector records to the storage. Args: records (List[VectorRecord]): List of vector records to be saved.
src/agents/utils/storages/vectordb_storages/base.py:87
Method
add
r"""Adds a list of vectors to the specified collection. Args: records (List[VectorRecord]): List of vectors to be added.
src/agents/utils/storages/vectordb_storages/milvus.py:253
Method
append_memory
(self, message)
src/agents/agents/memory.py:123
Method
backward
Performs backward calculation for each node in the given case. Args: case (Case): The case for which the backward calcul
src/agents/optimization/node_optimizer.py:121
Method
backward
Performs backward optimization for the given case to get the gradient of the loss. Args: case (Case): The case to be opt
src/agents/optimization/prompt_optimizer.py:130
Method
calculate_loss
Calculates the loss for a given case. Args: case (Case): The case for which the loss is to be calculated. ad
src/agents/optimization/loss.py:72
Method
check_config
()
src/agents/utils/config.py:64
Method
clean_text_data
r"""Cleans text data using a variety of cleaning functions provided by the `unstructured` library. This function applies multiple tex
src/agents/utils/unstructured_io.py:129
Method
clear
r"""Remove all vectors from the storage.
src/agents/utils/storages/vectordb_storages/qdrant.py:342
Method
clear
r"""Remove all vectors from the storage.
src/agents/utils/storages/vectordb_storages/base.py:150
Method
clear
r"""Removes all vectors from the Milvus collection. This method deletes the existing collection and then recreates it with the same sc
src/agents/utils/storages/vectordb_storages/milvus.py:351
Method
clear
r"""Removes all records from the key-value storage system.
src/agents/utils/storages/key_value_storages/in_memory.py:37
Method
clear
r"""Removes all records from the key-value storage system.
src/agents/utils/storages/key_value_storages/base.py:40
Method
client
r"""Provides access to the underlying vector database client.
src/agents/utils/storages/vectordb_storages/qdrant.py:356
Method
client
r"""Provides access to the underlying vector database client.
src/agents/utils/storages/vectordb_storages/base.py:161
Method
client
r"""Provides direct access to the Milvus client. This property allows for direct interactions with the Milvus client for operations that are
src/agents/utils/storages/vectordb_storages/milvus.py:364
Method
combine_results
()
src/agents/datasets/humaneval.py:270
Method
convert_action_to
(self, action_name: str)
src/agents/tools/mail.py:285
Method
convert_search_engine_to
(self, engine)
src/agents/tools/web_search.py:202
Method
delete
r"""Deletes a list of vectors identified by their IDs from the storage. Args: ids (List[str]): List of unique identifiers for the
src/agents/utils/storages/vectordb_storages/qdrant.py:267
Method
delete
r"""Deletes a list of vectors identified by their IDs from the storage. Args: ids (List[str]): List of unique identifiers for the
src/agents/utils/storages/vectordb_storages/base.py:104
Method
delete
r"""Deletes a list of vectors identified by their IDs from the storage. If unsure of ids you can first query the collection to grab th
src/agents/utils/storages/vectordb_storages/milvus.py:276
Method
dump
(self, save_path)
src/agents/task/task.py:77
Method
dump
Dumps the case to a JSON file. Args: save_path (str): The path where the JSON file will be saved.
src/agents/evaluation/case.py:248
Method
dump
Dump the trajectory to a json file.
src/agents/evaluation/trajectory.py:13
Method
dump
(self, path)
src/agents/agents/agent_team.py:175
Method
evaluate
Evaluate the output for a given index and return the evaluation info. Args: answer (str): The model-generated output for the
src/agents/datasets/creative_writing.py:102
Method
evaluate
Evaluate the correctness of a completion against the ground truth. Args: idx (int): The index of the case. a
src/agents/datasets/humaneval.py:190
Method
evaluate
Evaluate the provided answer for a given index against the ground truth. Args: idx (int): The index of the question being ev
src/agents/datasets/hotpotqa.py:101
Method
evaluate
Evaluate the dataset. Raises: NotImplementedError: If the method is not implemented by a subclass.
src/agents/datasets/base.py:104
Method
evaluate
Evaluate the executability metric of the project code. Args: answer (str): The model-generated output for the text at the giv
src/agents/datasets/software_dev.py:60
Method
evaluate
(self, idx: int, answer: str)
src/agents/datasets/math.py:113
Method
extract_data_from_text
r"""Extracts various types of data from text using functions from unstructured.cleaners.extract. Args: text (str): Text t
src/agents/utils/unstructured_io.py:229
Method
fail
(self)
src/agents/tools/web_browse.py:53
Function
formulate_prompt_for_node_backward
Formulate a prompt for node backward optimization. This function creates a prompt for node backward optimization by extracting the necessary
src/agents/optimization/prompt_formatter.py:239
Function
formulate_prompt_for_node_optim
Formulate a prompt for node optimization. This function creates a prompt for node optimization by gathering suggestions from the case list a
src/agents/optimization/prompt_formatter.py:272
Function
formulate_prompt_for_prompt_optim
Formulate a prompt for prompt optimization. This function constructs a prompt for prompt optimization, where the outer loop is based on stat
src/agents/optimization/prompt_formatter.py:153
Function
formulate_prompt_for_sop_optim
Formulate a prompt for SOP optimization. This function creates a prompt for the SOP optimizer by extracting necessary variables from the
src/agents/optimization/prompt_formatter.py:314
Method
func
(self, expression)
src/agents/tools/math.py:25
Method
func
(self, equation)
src/agents/tools/math.py:54
Method
func
(self, equation, variable)
src/agents/tools/math.py:84
Method
func
(self, weather_dict: Dict)
src/agents/tools/weather.py:68
← previous
next →
201–300 of 388, ranked by callers