You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/swarms/structs/agent.md
-6
Original file line number
Diff line number
Diff line change
@@ -183,7 +183,6 @@ graph TD
183
183
|`remove_tool(tool)`| Removes a tool from the agent's toolset. |`tool` (Callable): Tool to remove. |`agent.remove_tool(my_custom_tool)`|
184
184
|`remove_tools(tools)`| Removes multiple tools from the agent's toolset. |`tools` (List[Callable]): List of tools to remove. |`agent.remove_tools([tool1, tool2])`|
185
185
|`get_docs_from_doc_folders()`| Retrieves and processes documents from the specified folder. | None |`agent.get_docs_from_doc_folders()`|
186
-
|`check_end_session_agentops()`| Checks and ends the AgentOps session if enabled. | None |`agent.check_end_session_agentops()`|
187
186
|`memory_query(task, *args, **kwargs)`| Queries the long-term memory for relevant information. |`task` (str): The task or query.<br>`*args`, `**kwargs`: Additional arguments. |`result = agent.memory_query("Find information about X")`|
188
187
|`sentiment_analysis_handler(response)`| Performs sentiment analysis on the given response. |`response` (str): The response to analyze. |`agent.sentiment_analysis_handler("Great job!")`|
189
188
|`count_and_shorten_context_window(history, *args, **kwargs)`| Counts tokens and shortens the context window if necessary. |`history` (str): The conversation history.<br>`*args`, `**kwargs`: Additional arguments. |`shortened_history = agent.count_and_shorten_context_window(history)`|
@@ -195,7 +194,6 @@ graph TD
195
194
|`truncate_string_by_tokens(input_string, limit)`| Truncates a string to fit within a token limit. |`input_string` (str): String to truncate.<br>`limit` (int): Token limit. |`truncated_string = agent.truncate_string_by_tokens("Long string", 100)`|
196
195
|`tokens_operations(input_string)`| Performs various token-related operations on the input string. |`input_string` (str): String to process. |`processed_string = agent.tokens_operations("Input string")`|
197
196
|`parse_function_call_and_execute(response)`| Parses a function call from the response and executes it. |`response` (str): Response containing the function call. |`result = agent.parse_function_call_and_execute(response)`|
|`llm_output_parser(response)`| Parses the output from the language model. |`response` (Any): Response from the LLM. |`parsed_response = agent.llm_output_parser(llm_output)`|
200
198
|`log_step_metadata(loop, task, response)`| Logs metadata for each step of the agent's execution. |`loop` (int): Current loop number.<br>`task` (str): Current task.<br>`response` (str): Agent's response. |`agent.log_step_metadata(1, "Analyze data", "Analysis complete")`|
201
199
|`to_dict()`| Converts the agent's attributes to a dictionary. | None |`agent_dict = agent.to_dict()`|
0 commit comments