Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing docs for tools and models #534

Merged
merged 1 commit into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion superagi/models/agent_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class AgentConfiguration(DBBaseModel):
"""
Represents a configuration for an agent.
Agent related configurations like goals, instructions, constraints and tools are stored here

Attributes:
id (int): The unique identifier of the agent configuration.
Expand Down
2 changes: 1 addition & 1 deletion superagi/models/agent_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class AgentExecution(DBBaseModel):
"""
Represents an execution of an agent.
Represents single agent run

Attributes:
id (int): The unique identifier of the agent execution.
Expand Down
2 changes: 1 addition & 1 deletion superagi/models/agent_execution_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class AgentExecutionFeed(DBBaseModel):
"""
Represents a feed entry for an agent execution.
Feed of the agent execution.

Attributes:
id (int): The unique identifier of the agent execution feed.
Expand Down
2 changes: 1 addition & 1 deletion superagi/models/agent_execution_permission.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class AgentExecutionPermission(DBBaseModel):
"""
Represents an Agent Execution Permission record in the database.
Agent Execution Permissions at each step to be approved or rejected by the user.

Attributes:
id (Integer): The primary key of the agent execution permission record.
Expand Down
2 changes: 1 addition & 1 deletion superagi/models/agent_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class AgentTemplate(DBBaseModel):
"""
Represents a preconfigured agent template.
Preconfigured agent templates that can be used to create agents.

Attributes:
id (int): The unique identifier of the agent template.
Expand Down
2 changes: 1 addition & 1 deletion superagi/models/agent_template_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class AgentTemplateConfig(DBBaseModel):
"""
Represents the configuration settings for an agent template.
Agent template related configurations like goals, instructions, constraints and tools are stored here

Attributes:
id (int): The unique identifier of the agent template config.
Expand Down
2 changes: 1 addition & 1 deletion superagi/models/agent_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class AgentWorkflow(DBBaseModel):
"""
Represents an agent workflow.
Agent workflows which runs part of each agent execution step

Attributes:
id (int): The unique identifier of the agent workflow.
Expand Down
2 changes: 1 addition & 1 deletion superagi/models/agent_workflow_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class AgentWorkflowStep(DBBaseModel):
"""
Represents a step in an agent workflow.
Step of an agent workflow

Attributes:
id (int): The unique identifier of the agent workflow step.
Expand Down
2 changes: 1 addition & 1 deletion superagi/models/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class Configuration(DBBaseModel):
"""
Model representing a configuration.
General org level configurations are stored here

Attributes:
id (Integer): The primary key of the configuration.
Expand Down
2 changes: 1 addition & 1 deletion superagi/models/toolkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class Toolkit(DBBaseModel):
"""
ToolKit - used to store tool kits
ToolKit - Used to group tools together
Attributes:
id(int) : id of the tool kit
name(str) : name of the tool kit
Expand Down
2 changes: 1 addition & 1 deletion superagi/tools/email/read_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _execute(self, imap_folder: str = "INBOX", page: int = 0, limit: int = 5) ->
limit : Number of emails to fetch in one cycle. Defaults to 5.

Returns:
email content or error message
email content
"""
email_sender = self.get_tool_config('EMAIL_ADDRESS')
email_password = self.get_tool_config('EMAIL_PASSWORD')
Expand Down
2 changes: 1 addition & 1 deletion superagi/tools/email/send_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def _execute(self, to: str, subject: str, body: str) -> str:
body : The body of the email.

Returns:

success or error message.
"""
email_sender = self.get_tool_config('EMAIL_ADDRESS')
email_password = self.get_tool_config('EMAIL_PASSWORD')
Expand Down
2 changes: 1 addition & 1 deletion superagi/tools/email/send_email_attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def _execute(self, to: str, subject: str, body: str, filename: str) -> str:
filename : The name of the file to be sent as an attachment with the email.

Returns:

success or failure message
"""
input_root_dir = self.get_tool_config('RESOURCES_INPUT_ROOT_DIR')
output_root_dir = self.get_tool_config('RESOURCES_OUTPUT_ROOT_DIR')
Expand Down
2 changes: 1 addition & 1 deletion superagi/tools/file/append_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _execute(self, file_name: str, content: str):
content : The text to append to the file.

Returns:
file written to successfully. or error message.
success or error message.
"""
final_path = ResourceHelper.get_root_output_dir() + file_name
if "{agent_id}" in final_path:
Expand Down
2 changes: 1 addition & 1 deletion superagi/tools/file/delete_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _execute(self, file_name: str):
file_name : The name of the file to delete.

Returns:
file deleted successfully. or error message.
success or error message.
"""
final_path = ResourceHelper.get_root_output_dir()
if "{agent_id}" in final_path:
Expand Down
2 changes: 1 addition & 1 deletion superagi/tools/file/write_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ def _execute(self, file_name: str, content: str):
content : The text to write to the file.

Returns:
file written to successfully. or error message.
Success or failure message.
"""
return self.resource_manager.write_file(file_name, content)
2 changes: 1 addition & 1 deletion superagi/tools/github/add_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def _execute(self, repository_name: str, base_branch: str, body: str, commit_mes
folder_path : The path of the folder to add the file to.

Returns:
Pull request to add file/folder has been created. or error message.
Pull request success or error message.
"""
try:
github_access_token = self.get_tool_config("GITHUB_ACCESS_TOKEN")
Expand Down
2 changes: 1 addition & 1 deletion superagi/tools/github/delete_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def _execute(self, repository_name: str, base_branch: str, file_name: str, commi
folder_path : The path of the folder to delete the file from.

Returns:
pull request deletion message. or error message
pull request deletion message or error message
"""

try:
Expand Down
2 changes: 1 addition & 1 deletion superagi/tools/github/search_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def _execute(self, repository_owner: str, repository_name: str, file_name: str,
folder_path : The path of the folder to search the file in.

Returns:
The content of the file.
The content of the github file.
"""
github_access_token = self.get_tool_config("GITHUB_ACCESS_TOKEN")
github_username = self.get_tool_config("GITHUB_USERNAME")
Expand Down
2 changes: 1 addition & 1 deletion superagi/tools/google_search/google_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def _execute(self, query: str) -> tuple:
query : The query to search for.

Returns:
A tuple of (snippets, webpages, links)
Search result summary along with related links
"""
api_key = self.get_tool_config("GOOGLE_API_KEY")
search_engine_id = self.get_tool_config("SEARCH_ENGINE_ID")
Expand Down
2 changes: 1 addition & 1 deletion superagi/tools/google_serp_search/google_serp_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def _execute(self, query: str) -> tuple:
query : The query to search for.

Returns:
A tuple of (snippets, webpages, links)
Search result summary along with related links
"""
api_key = self.get_tool_config("SERP_API_KEY")
serp_api = GoogleSerpApiWrap(api_key)
Expand Down
2 changes: 1 addition & 1 deletion superagi/tools/jira/edit_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _execute(self, key: str, fields: dict):
"name": "Low"}}

Returns:
The key of the created issue. or Issue not found!
The key of the edited issue or Issue not found!
"""
jira = self.build_jira_instance()
issues = jira.search_issues('key=')
Expand Down
2 changes: 1 addition & 1 deletion superagi/tools/jira/get_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def _execute(self) -> str:
Execute the get projects tool.

Returns:
The key of the created issue.
The project ids with project code.
"""
jira = self.build_jira_instance()
projects = jira.projects()
Expand Down
6 changes: 3 additions & 3 deletions superagi/tools/jira/search_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pydantic import Field, BaseModel

from superagi.helper.token_counter import TokenCounter
from superagi.tools.jira.tool import JiraTool, JiraIssueSchema
from superagi.tools.jira.tool import JiraTool


class SearchIssueSchema(BaseModel):
Expand Down Expand Up @@ -33,12 +33,12 @@ def _execute(self, query: str) -> str:

Args:
query : JQL query string to search issues. For example, to find all the issues in project "Test"
assigned to the, you would pass in the following string: project = Test AND assignee = currentUser() or to
assigned to, you would pass in the following string: project = Test AND assignee = currentUser() or to
find issues with summaries that contain the word "test", you would pass in the following string: summary ~
'test'.

Returns:
The key of the created issue.
The list of issues matching the query.
"""
jira = self.build_jira_instance()
issues = jira.search_issues(query)
Expand Down
2 changes: 1 addition & 1 deletion superagi/tools/thinking/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def _execute(self, task_description: str):
task_description : The task description.

Returns:
response from the Thinking tool. or error message.
Thought process of llm for the task
"""
try:
prompt = PromptReader.read_tools_prompt(__file__, "thinking.txt")
Expand Down