MCPcopy Create free account

hub / github.com/danikhan632/Auto-GPT-Text-Gen-Plugin / functions

Functions84 in github.com/danikhan632/Auto-GPT-Text-Gen-Plugin

↓ 18 callersMethodget_profile_attribute
Get an attribute from the AI config. Args: attribute (str): The attribute to get. Returns: str: The
src/auto_gpt_text_gen_plugin/prompt_engine.py:242
↓ 18 callersFunctionrun_cmd
(cmd, assert_success=False, environment=False, capture_output=False, env=None)
docs/webui.py:16
↓ 7 callersMethodremove_whitespace
Flatten multiple whitespace characters into a single space. Args: text (str): The text to remove whitespace from.
src/auto_gpt_text_gen_plugin/prompt_engine.py:167
↓ 6 callersMethodmatch_prop
Match a property named tag using a regular expression. Args: srctext (str): The text to inspect rege
src/auto_gpt_text_gen_plugin/prompt_engine.py:663
↓ 3 callersMethodget_profile_numbered_list
Get a numbered list from the profile. Args: attribute (str): The attribute to get. container (str, o
src/auto_gpt_text_gen_plugin/prompt_engine.py:347
↓ 3 callersMethodmessages_to_conversation
Convert a list of messages to a conversation. Args: messages (list): The messages to convert. attrib
src/auto_gpt_text_gen_plugin/prompt_engine.py:641
↓ 3 callersMethodstrip_newlines
Strip new lines from a string. Args: text (str): The string to strip. Returns:
src/auto_gpt_text_gen_plugin/prompt_engine.py:488
↓ 2 callersMethoddict_to_yaml_string
Convert a dictionary to a YAML list string where the key and value are concatinated , seperated by a colon. Args:
src/auto_gpt_text_gen_plugin/prompt_engine.py:442
↓ 2 callersMethodextract_from_original
Extract a string from the original system message. Args: regex (str): The regular expression to use.
src/auto_gpt_text_gen_plugin/prompt_engine.py:372
↓ 2 callersMethodget_profile_list_as_line
Get a list from the profile. Args: attribute (str): The attribute to get. container (str, optional): The con
src/auto_gpt_text_gen_plugin/prompt_engine.py:321
↓ 2 callersMethodlist_to_yaml_string
Convert a list to a YAML list string. Args: old_list (list): The list to convert. Returns:
src/auto_gpt_text_gen_plugin/prompt_engine.py:422
↓ 2 callersMethodstring_to_yaml
Convert a string to a YAML list with leading dashes. Args: string (str): The string to convert.
src/auto_gpt_text_gen_plugin/prompt_engine.py:124
↓ 2 callersFunctionupdate_dependencies
()
docs/webui.py:83
↓ 1 callersMethodcalculate_token_length
Calculate the length of a message in tokens. Args: message (str): The message to calculate the length of.
src/auto_gpt_text_gen_plugin/client.py:267
↓ 1 callersFunctioncheck_env
()
docs/webui.py:37
↓ 1 callersMethodcreate_chat_completion
Create a chat completion API call to Text Gen WebUI Args: messages (list): The messages to be used as context.
src/auto_gpt_text_gen_plugin/client.py:48
↓ 1 callersFunctiondownload_model
()
docs/webui.py:164
↓ 1 callersMethodget_agent_goals
Get the agent's goals from the AI config. Returns: list: The agent's goals.
src/auto_gpt_text_gen_plugin/prompt_engine.py:306
↓ 1 callersMethodget_agent_name
Get the agent's name from the AI config. Returns: str: The agent's name.
src/auto_gpt_text_gen_plugin/prompt_engine.py:284
↓ 1 callersMethodget_agent_role
Get the agent's role from the AI config. Returns: str: The agent's role.
src/auto_gpt_text_gen_plugin/prompt_engine.py:295
↓ 1 callersMethodget_ai_constraints
Build the AI constraints string Returns: str: The AI constraints string.
src/auto_gpt_text_gen_plugin/prompt_engine.py:541
↓ 1 callersMethodget_ai_critique
Build the AI critique string Returns: str: The AI critique string.
src/auto_gpt_text_gen_plugin/prompt_engine.py:589
↓ 1 callersMethodget_ai_profile
Build the AI profile string Returns: str: The AI profile string.
src/auto_gpt_text_gen_plugin/prompt_engine.py:518
↓ 1 callersMethodget_ai_resources
Build the AI resources string Returns: str: The AI resources string.
src/auto_gpt_text_gen_plugin/prompt_engine.py:573
↓ 1 callersMethodget_command_list
Get the command list from the system message. Returns: str: The command list.
src/auto_gpt_text_gen_plugin/prompt_engine.py:502
↓ 1 callersMethodget_commands
Build the commands string Returns: str: The commands string.
src/auto_gpt_text_gen_plugin/prompt_engine.py:557
↓ 1 callersMethodget_context_size
Get the context size of a model. Args: model (str): The ID of the model to get the context size of.
src/auto_gpt_text_gen_plugin/client.py:231
↓ 1 callersMethodget_embedding
(self,text)
src/auto_gpt_text_gen_plugin/client.py:129
↓ 1 callersMethodget_end_strip
Get the end strip index from the profile. Returns: int: The end strip index.
src/auto_gpt_text_gen_plugin/prompt_engine.py:605
↓ 1 callersMethodget_profile_attribute_as_raw
Get an attribute from the AI config. Args: attribute (str): The attribute to get. Returns: str: The
src/auto_gpt_text_gen_plugin/prompt_engine.py:263
↓ 1 callersMethodget_response_format
Build the response format string Returns: str: The response format string.
src/auto_gpt_text_gen_plugin/prompt_engine.py:623
↓ 1 callersMethodget_user_name
Return the user's name from the prompt profile. Returns: str: The user's name.
src/auto_gpt_text_gen_plugin/prompt_engine.py:220
↓ 1 callersMethodhandle_get_embedding
This method cllls the get_embedding method of whatever API is loaded Args: text (str): The text to be converted
src/auto_gpt_text_gen_plugin/text_gen_plugin.py:73
↓ 1 callersFunctioninstall_dependencies
()
docs/webui.py:50
↓ 1 callersMethodis_ai_system_prompt
Check if the prompt is a system prompt used for standard roleplay Args: prompt (str): The prompt to check. Retu
src/auto_gpt_text_gen_plugin/prompt_engine.py:150
↓ 1 callersMethodload_prompt_config
Load the prompt from the defined file. Args: prompt_profile (str): The path to the prompt profile. Returns:
src/auto_gpt_text_gen_plugin/text_gen_plugin.py:27
↓ 1 callersMethodprompt_for_model
Prompt the user to select a model Args: model_list (list): The list of models to choose from.
src/auto_gpt_text_gen_plugin/client.py:195
↓ 1 callersMethodreshape_message
Inhereted method
src/auto_gpt_text_gen_plugin/prompt_engine.py:204
↓ 1 callersMethodreshape_response
Inhereted method
src/auto_gpt_text_gen_plugin/prompt_engine.py:212
↓ 1 callersFunctionrun_model
()
docs/webui.py:169
↓ 1 callersMethodselect_model
Present the user with a list of models to choose from, and return the ID of the selected model. Returns: str: Th
src/auto_gpt_text_gen_plugin/client.py:150
↓ 1 callersMethodsimple_response_to_autogpt_response
Convert a simple response to an Auto-GPT response Args: simple_response (dict): The simple response to convert.
src/auto_gpt_text_gen_plugin/prompt_engine.py:55
↓ 1 callersMethodstring_to_numbered_list
Convert a string of a numbered list to a numbered list. Args: string (str): The string to convert.
src/auto_gpt_text_gen_plugin/prompt_engine.py:393
Method__init__
Constructor
src/auto_gpt_text_gen_plugin/client.py:14
Method__init__
Initializes the MonolithicPrompt class.
src/auto_gpt_text_gen_plugin/monolithic_prompt.py:10
Method__init__
Initializes the MonolithicPrompt class.
src/auto_gpt_text_gen_plugin/default_prompt.py:6
Method__init__
(self)
src/auto_gpt_text_gen_plugin/__init__.py:22
Method__init__
(self)
src/auto_gpt_text_gen_plugin/prompt_engine.py:11
Method__init__
Args: plugin (AutoGPTPluginTemplate): The plugin that is using this controller.
src/auto_gpt_text_gen_plugin/text_gen_plugin.py:14
Methodcan_handle_chat_completion
This method is called to check that the plugin can handle the chat_completion method. Args: messages (List[Message]): T
src/auto_gpt_text_gen_plugin/__init__.py:222
Methodcan_handle_on_instruction
This method is called to check that the plugin can handle the on_instruction method. Returns: bool: True if the plugin ca
src/auto_gpt_text_gen_plugin/__init__.py:135
Methodcan_handle_on_planning
This method is called to check that the plugin can handle the on_planning method. Returns: bool: True if the plugin can h
src/auto_gpt_text_gen_plugin/__init__.py:72
Methodcan_handle_on_response
This method is called to check that the plugin can handle the on_response method. Returns: bool: True if the plugin can h
src/auto_gpt_text_gen_plugin/__init__.py:36
Methodcan_handle_post_command
This method is called to check that the plugin can handle the post_command method. Returns: bool: True if the plugin can
src/auto_gpt_text_gen_plugin/__init__.py:200
Methodcan_handle_post_instruction
This method is called to check that the plugin can handle the post_instruction method. Returns: bool: True if the plugin
src/auto_gpt_text_gen_plugin/__init__.py:155
Methodcan_handle_post_planning
This method is called to check that the plugin can handle the post_planning method. Returns: bool: True if the plugin can
src/auto_gpt_text_gen_plugin/__init__.py:93
Methodcan_handle_post_prompt
This method is called to check that the plugin can handle the post_prompt method. Returns: bool: True if the plugin can h
src/auto_gpt_text_gen_plugin/__init__.py:50
Methodcan_handle_pre_command
This method is called to check that the plugin can handle the pre_command method. Returns: bool: True if the plugin can h
src/auto_gpt_text_gen_plugin/__init__.py:176
Methodcan_handle_pre_instruction
This method is called to check that the plugin can handle the pre_instruction method. Returns: bool: True if the plugin c
src/auto_gpt_text_gen_plugin/__init__.py:114
Methodcan_handle_report
This method is called to check that the plugin can handle the report method. Returns: bool: True if the plugin can handle
src/auto_gpt_text_gen_plugin/__init__.py:306
Methodcan_handle_text_embedding
This method is called to check that the plugin can handle the text_embedding method. Args: text (str): The text to be co
src/auto_gpt_text_gen_plugin/__init__.py:256
Methodcan_handle_user_input
This method is called to check that the plugin can handle the user_input method. Args: user_input (str): The user input.
src/auto_gpt_text_gen_plugin/__init__.py:280
Methodextract_commands
Extract commands from the system prompt Args: message (str): The message to extract commands from. Defaults to '
src/auto_gpt_text_gen_plugin/prompt_engine.py:181
Methodget_ai_chat_name
Get the name of the AI to use when building chat messages Returns: str: The AI's name.
src/auto_gpt_text_gen_plugin/prompt_engine.py:231
Methodget_as_json
Get an attribute from the AI config as a JSON string. Args: attribute (str): The attribute to get. Returns:
src/auto_gpt_text_gen_plugin/prompt_engine.py:464
Methodhandle_chat_completion
This method is called when the chat completion is done. Args: messages (List[Message]): The messages. model (str): Th
src/auto_gpt_text_gen_plugin/__init__.py:239
Methodhandle_chat_completion
This method cllls the chat_completion method of whatever API is loaded Args: messages (list): The messages to be
src/auto_gpt_text_gen_plugin/text_gen_plugin.py:49
Methodhandle_text_embedding
This method is called when the chat completion is done. Args: text (str): The text to be convert to embedding. Returns:
src/auto_gpt_text_gen_plugin/__init__.py:268
Methodon_instruction
This method is called when the instruction chat is done. Args: messages (List[Message]): The list of context messages. R
src/auto_gpt_text_gen_plugin/__init__.py:143
Methodon_planning
This method is called before the planning chat completion is done. Args: prompt (PromptGenerator): The prompt generator.
src/auto_gpt_text_gen_plugin/__init__.py:81
Methodon_response
This method is called when a response is received from the model.
src/auto_gpt_text_gen_plugin/__init__.py:45
Methodpost_command
This method is called after the command is executed. Args: command_name (str): The command name. response (str): The
src/auto_gpt_text_gen_plugin/__init__.py:209
Methodpost_instruction
This method is called after the instruction chat is done. Args: response (str): The response. Returns: str:
src/auto_gpt_text_gen_plugin/__init__.py:164
Methodpost_planning
This method is called after the planning chat completion is done. Args: response (str): The response. Returns:
src/auto_gpt_text_gen_plugin/__init__.py:102
Methodpost_prompt
This method is called just after the generate_prompt is called, but actually before the prompt is generated. Args: pr
src/auto_gpt_text_gen_plugin/__init__.py:59
Methodpre_command
This method is called before the command is executed. Args: command_name (str): The command name. arguments (Dict[str
src/auto_gpt_text_gen_plugin/__init__.py:185
Methodpre_instruction
This method is called before the instruction chat is done. Args: messages (List[Message]): The list of context messages.
src/auto_gpt_text_gen_plugin/__init__.py:123
Methodrecover_json_response
Recover a JSON response from a message. Args: message (str): The message to recover the JSON from.
src/auto_gpt_text_gen_plugin/prompt_engine.py:689
Methodreport
This method is called to report a message to the user. Args: message (str): The message to report.
src/auto_gpt_text_gen_plugin/__init__.py:315
Methodreshape_message
Convert the OpenAI message format to a string that can be used by the API. Args: messages (list): List of messages. Defa
src/auto_gpt_text_gen_plugin/monolithic_prompt.py:17
Methodreshape_message
Convert the OpenAI message format to a string that can be used by the API. Args: messages (list): List of messages. Defa
src/auto_gpt_text_gen_plugin/default_prompt.py:13
Methodreshape_response
Convert the API response to a dictionary, then convert thoughts->plan to a YAML list then return a JSON string of the object
src/auto_gpt_text_gen_plugin/monolithic_prompt.py:72
Methodreshape_response
Pass-back message as a dictionary. Args: message (str): The message to reshape. Returns:
src/auto_gpt_text_gen_plugin/default_prompt.py:27
Methoduser_input
This method is called to request user input to the user. Args: user_input (str): The question or prompt to ask the user.
src/auto_gpt_text_gen_plugin/__init__.py:292