id int64 0 190k | prompt stringlengths 21 13.4M | docstring stringlengths 1 12k ⌀ |
|---|---|---|
145,983 | import os
from pathlib import Path
import requests
import zipfile
import json
def get_marketplace_tool_links(repo_url):
def update_tools_json(existing_tools_json_path, folder_links):
def load_marketplace_tools():
marketplace_url = "TransformerOptimus/SuperAGI-Tools"
tools_config_path = str(Path(__file__).paren... | null |
145,984 | import os
from pathlib import Path
import requests
import zipfile
import json
def download_tool(tool_url, target_folder):
parsed_url = parse_github_url(tool_url)
parts = parsed_url.split("/")
owner, repo, branch, path = parts[0], parts[1], parts[2], "/".join(parts[3:])
archive_url = f"https://api.github... | null |
145,985 | from fastapi import APIRouter
from fastapi import HTTPException, Depends ,Security
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from superagi.worker import execute_agent
from superagi.helper.auth import validate_api_key,get_organisation_from_api_key
from superagi.models.agent import Agent
from super... | null |
145,986 | from fastapi import APIRouter
from fastapi import HTTPException, Depends ,Security
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from superagi.worker import execute_agent
from superagi.helper.auth import validate_api_key,get_organisation_from_api_key
from superagi.models.agent import Agent
from super... | null |
145,987 | from fastapi import APIRouter
from fastapi import HTTPException, Depends ,Security
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from superagi.worker import execute_agent
from superagi.helper.auth import validate_api_key,get_organisation_from_api_key
from superagi.models.agent import Agent
from super... | null |
145,988 | from fastapi import APIRouter
from fastapi import HTTPException, Depends ,Security
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from superagi.worker import execute_agent
from superagi.helper.auth import validate_api_key,get_organisation_from_api_key
from superagi.models.agent import Agent
from super... | null |
145,989 | from fastapi import APIRouter
from fastapi import HTTPException, Depends ,Security
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from superagi.worker import execute_agent
from superagi.helper.auth import validate_api_key,get_organisation_from_api_key
from superagi.models.agent import Agent
from super... | null |
145,990 | from fastapi import APIRouter
from fastapi import HTTPException, Depends ,Security
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from superagi.worker import execute_agent
from superagi.helper.auth import validate_api_key,get_organisation_from_api_key
from superagi.models.agent import Agent
from super... | null |
145,991 | from fastapi import APIRouter
from fastapi import HTTPException, Depends ,Security
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from superagi.worker import execute_agent
from superagi.helper.auth import validate_api_key,get_organisation_from_api_key
from superagi.models.agent import Agent
from super... | null |
145,992 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends
from fastapi import APIRouter
from superagi.config.config import get_config
from datetime import datetime
from superagi.helper.time_helper import get_time_difference
from superagi.models.vector_dbs import Vectordbs
from superagi.helper.auth im... | null |
145,993 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends
from fastapi import APIRouter
from superagi.config.config import get_config
from datetime import datetime
from superagi.helper.time_helper import get_time_difference
from superagi.models.vector_dbs import Vectordbs
from superagi.helper.auth im... | null |
145,994 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends
from fastapi import APIRouter
from superagi.config.config import get_config
from datetime import datetime
from superagi.helper.time_helper import get_time_difference
from superagi.models.vector_dbs import Vectordbs
from superagi.helper.auth im... | null |
145,995 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends
from fastapi import APIRouter
from superagi.config.config import get_config
from datetime import datetime
from superagi.helper.time_helper import get_time_difference
from superagi.models.vector_dbs import Vectordbs
from superagi.helper.auth im... | null |
145,996 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends
from fastapi import APIRouter
from superagi.config.config import get_config
from datetime import datetime
from superagi.helper.time_helper import get_time_difference
from superagi.models.vector_dbs import Vectordbs
from superagi.helper.auth im... | null |
145,997 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends
from fastapi import APIRouter
from superagi.config.config import get_config
from datetime import datetime
from superagi.helper.time_helper import get_time_difference
from superagi.models.vector_dbs import Vectordbs
from superagi.helper.auth im... | null |
145,998 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends
from fastapi import APIRouter
from superagi.config.config import get_config
from datetime import datetime
from superagi.helper.time_helper import get_time_difference
from superagi.models.vector_dbs import Vectordbs
from superagi.helper.auth im... | null |
145,999 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends
from fastapi import APIRouter
from superagi.config.config import get_config
from datetime import datetime
from superagi.helper.time_helper import get_time_difference
from superagi.models.vector_dbs import Vectordbs
from superagi.helper.auth im... | null |
146,000 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends
from fastapi import APIRouter
from superagi.config.config import get_config
from datetime import datetime
from superagi.helper.time_helper import get_time_difference
from superagi.models.vector_dbs import Vectordbs
from superagi.helper.auth im... | null |
146,001 | from datetime import datetime
from fastapi import APIRouter
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.models.organisation import Organis... | Create a new tool. Args: tool (ToolIn): Tool data. Returns: Tool: The created tool. Raises: HTTPException (status_code=400): If there is an issue creating the tool. |
146,002 | from datetime import datetime
from fastapi import APIRouter
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.models.organisation import Organis... | Get a particular tool details. Args: tool_id (int): ID of the tool. Returns: Tool: The tool details. Raises: HTTPException (status_code=404): If the tool with the specified ID is not found. |
146,003 | from datetime import datetime
from fastapi import APIRouter
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.models.organisation import Organis... | Get all tools |
146,004 | from datetime import datetime
from fastapi import APIRouter
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.models.organisation import Organis... | Update a particular tool. Args: tool_id (int): ID of the tool. tool (ToolIn): Updated tool data. Returns: Tool: The updated tool details. Raises: HTTPException (status_code=404): If the tool with the specified ID is not found. |
146,005 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends, Query
from fastapi import APIRouter
from superagi.helper.auth import get_user_organisation
from superagi.models.vector_dbs import Vectordbs
from superagi.models.vector_db_indices import VectordbIndices
from superagi.models.knowledges import K... | null |
146,006 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends, Query
from fastapi import APIRouter
from superagi.helper.auth import get_user_organisation
from superagi.models.vector_dbs import Vectordbs
from superagi.models.vector_db_indices import VectordbIndices
from superagi.models.knowledges import K... | null |
146,007 | from fastapi import APIRouter
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from sqlalchemy import desc
import ast
from pytz import timezone
from sqlalchemy import func, or_
from superagi.models.agent import Agent
from su... | Create a new agent with configurations and scheduling. Args: agent_with_config_schedule (AgentConfigSchedule): Data for creating a new agent with configurations and scheduling. Returns: dict: Dictionary containing the created agent's ID, name, content type and schedule ID of the agent. Raises: HTTPException (status_cod... |
146,008 | from fastapi import APIRouter
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from sqlalchemy import desc
import ast
from pytz import timezone
from sqlalchemy import func, or_
from superagi.models.agent import Agent
from su... | Stopping the scheduling for a given agent. Args: agent_id (int): Identifier of the Agent Authorize (AuthJWT, optional): Authorization dependency. Defaults to Depends(check_auth). Raises: HTTPException (status_code=404): If the agent schedule is not found. |
146,009 | from fastapi import APIRouter
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from sqlalchemy import desc
import ast
from pytz import timezone
from sqlalchemy import func, or_
from superagi.models.agent import Agent
from su... | Edit the scheduling for a given agent. Args: agent_id (int): Identifier of the Agent schedule (AgentSchedule): New schedule data Authorize (AuthJWT, optional): Authorization dependency. Defaults to Depends(check_auth). Raises: HTTPException (status_code=404): If the agent schedule is not found. |
146,010 | from fastapi import APIRouter
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from sqlalchemy import desc
import ast
from pytz import timezone
from sqlalchemy import func, or_
from superagi.models.agent import Agent
from su... | Get the scheduling data for a given agent. Args: agent_id (int): Identifier of the Agent Raises: HTTPException (status_code=404): If the agent schedule is not found. Returns: current_datetime (DateTime): Current Date and Time. recurrence_interval (String): Time interval for recurring schedule run. expiry_date (DateTime... |
146,011 | from fastapi import APIRouter
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from sqlalchemy import desc
import ast
from pytz import timezone
from sqlalchemy import func, or_
from superagi.models.agent import Agent
from su... | Get all agents by project ID. Args: project_id (int): Identifier of the project. Authorize (AuthJWT, optional): Authorization dependency. Defaults to Depends(check_auth). Returns: list: List of agents associated with the project, including their status and scheduling information. Raises: HTTPException (status_code=404)... |
146,012 | from fastapi import APIRouter
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from sqlalchemy import desc
import ast
from pytz import timezone
from sqlalchemy import func, or_
from superagi.models.agent import Agent
from su... | Delete an existing Agent - Updates the is_deleted flag: Executes a soft delete - AgentExecutions are updated to: "TERMINATED" if agentexecution is created, All the agent executions are updated - AgentExecutionPermission is set to: "REJECTED" if agentexecutionpersmision is created Args: agent_id (int): Identifier of the... |
146,013 | from fastapi import APIRouter
from fastapi import Depends
from fastapi_sqlalchemy import db
from superagi.helper.auth import get_user_organisation
from superagi.models.workflows.agent_workflow import AgentWorkflow
def get_user_organisation(Authorize: AuthJWT = Depends(check_auth)):
"""
Function to get the orga... | Lists agent workflows. Args: organisation: User's organisation. Returns: list: A list of dictionaries representing the agent workflows. |
146,014 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from pydantic import BaseModel
from superagi.models.project import Project
from superagi.models.organisation import Organisation
from fastapi import APIRouter
from superagi.helper.auth import check_auth
fro... | Create a new project. Args: project (Project): Project data. Returns: dict: Dictionary containing the created project. Raises: HTTPException (status_code=404): If the organization with the specified ID is not found. |
146,015 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from pydantic import BaseModel
from superagi.models.project import Project
from superagi.models.organisation import Organisation
from fastapi import APIRouter
from superagi.helper.auth import check_auth
fro... | Get project details by project_id. Args: project_id (int): ID of the project. Returns: dict: Dictionary containing the project details. Raises: HTTPException (status_code=404): If the project with the specified ID is not found. |
146,016 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from pydantic import BaseModel
from superagi.models.project import Project
from superagi.models.organisation import Organisation
from fastapi import APIRouter
from superagi.helper.auth import check_auth
fro... | Update a project detail by project_id. Args: project_id (int): ID of the project. project (Project): Updated project data. Returns: dict: Dictionary containing the updated project details. Raises: HTTPException (status_code=404): If the project with the specified ID is not found. HTTPException (status_code=404): If the... |
146,017 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from pydantic import BaseModel
from superagi.models.project import Project
from superagi.models.organisation import Organisation
from fastapi import APIRouter
from superagi.helper.auth import check_auth
fro... | Get all projects by organisation_id and create default if no project. Args: organisation_id (int): ID of the organisation. Returns: List[Project]: List of projects belonging to the organisation. Raises: HTTPException (status_code=404): If the organization with the specified ID is not found. |
146,018 | from fastapi import Depends, Query
from fastapi import APIRouter
from fastapi.responses import RedirectResponse
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
from sqlalchemy.orm import sessionmaker
from fastapi import HTTPException
import superagi
import json
import requests
from datetime impor... | null |
146,019 | from fastapi import Depends, Query
from fastapi import APIRouter
from fastapi.responses import RedirectResponse
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
from sqlalchemy.orm import sessionmaker
from fastapi import HTTPException
import superagi
import json
import requests
from datetime impor... | null |
146,020 | from fastapi import Depends, Query
from fastapi import APIRouter
from fastapi.responses import RedirectResponse
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
from sqlalchemy.orm import sessionmaker
from fastapi import HTTPException
import superagi
import json
import requests
from datetime impor... | null |
146,021 | from datetime import datetime
from typing import Optional
from fastapi import APIRouter
from pydantic import BaseModel
from superagi.models.models_config import ModelsConfig
from superagi.models.configuration import Configuration
from superagi.models.organisation import Organisation
from fastapi_sqlalchemy import db
fr... | Creates a new Organisation level config. Args: config (Configuration): Configuration details. organisation_id (int): ID of the organisation. Returns: Configuration: Created configuration. |
146,022 | from datetime import datetime
from typing import Optional
from fastapi import APIRouter
from pydantic import BaseModel
from superagi.models.models_config import ModelsConfig
from superagi.models.configuration import Configuration
from superagi.models.organisation import Organisation
from fastapi_sqlalchemy import db
fr... | Get a configuration by organisation ID and key. Args: organisation_id (int): ID of the organisation. key (str): Key of the configuration. Authorize (AuthJWT, optional): Authorization JWT token. Defaults to Depends(check_auth). Returns: Configuration: Retrieved configuration. |
146,023 | from datetime import datetime
from typing import Optional
from fastapi import APIRouter
from pydantic import BaseModel
from superagi.models.models_config import ModelsConfig
from superagi.models.configuration import Configuration
from superagi.models.organisation import Organisation
from fastapi_sqlalchemy import db
fr... | Get all configurations for a given organisation ID. Args: organisation_id (int): ID of the organisation. Authorize (AuthJWT, optional): Authorization JWT token. Defaults to Depends(check_auth). Returns: List[Configuration]: List of configurations for the organisation. |
146,024 | from datetime import datetime
from typing import Optional
from fastapi import APIRouter
from pydantic import BaseModel
from superagi.models.models_config import ModelsConfig
from superagi.models.configuration import Configuration
from superagi.models.organisation import Organisation
from fastapi_sqlalchemy import db
fr... | Get the current environment. Returns: dict: Dictionary containing the current environment. |
146,025 | from datetime import datetime
from typing import Optional, Union, List
from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from pydantic import BaseModel
from pydantic.fields import List
from superagi.controllers.types.agent_execution_config import AgentRunI... | Create a new agent execution/run. Args: agent_execution (AgentExecution): The agent execution data. Returns: AgentExecution: The created agent execution. Raises: HTTPException (Status Code=404): If the agent is not found. |
146,026 | from datetime import datetime
from typing import Optional, Union, List
from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from pydantic import BaseModel
from pydantic.fields import List
from superagi.controllers.types.agent_execution_config import AgentRunI... | Create a new agent run with all the information(goals, instructions, model, etc). Args: agent_execution (AgentExecution): The agent execution data. Returns: AgentExecution: The created agent execution. Raises: HTTPException (Status Code=404): If the agent is not found. |
146,027 | from datetime import datetime
from typing import Optional, Union, List
from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from pydantic import BaseModel
from pydantic.fields import List
from superagi.controllers.types.agent_execution_config import AgentRunI... | Schedules an already existing agent. Args: agent_schedule (AgentScheduleInput): Data for creating a scheduling for an existing agent. agent_id (Integer): The ID of the agent being scheduled. start_time (DateTime): The date and time from which the agent is scheduled. recurrence_interval (String): Stores "none" if not re... |
146,028 | from datetime import datetime
from typing import Optional, Union, List
from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from pydantic import BaseModel
from pydantic.fields import List
from superagi.controllers.types.agent_execution_config import AgentRunI... | Get an agent execution by agent_execution_id. Args: agent_execution_id (int): The ID of the agent execution. Returns: AgentExecution: The requested agent execution. Raises: HTTPException (Status Code=404): If the agent execution is not found. |
146,029 | from datetime import datetime
from typing import Optional, Union, List
from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from pydantic import BaseModel
from pydantic.fields import List
from superagi.controllers.types.agent_execution_config import AgentRunI... | Update details of particular agent_execution by agent_execution_id |
146,030 | from datetime import datetime
from typing import Optional, Union, List
from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from pydantic import BaseModel
from pydantic.fields import List
from superagi.controllers.types.agent_execution_config import AgentRunI... | Get list of all agent_ids for a given status |
146,031 | from datetime import datetime
from typing import Optional, Union, List
from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from pydantic import BaseModel
from pydantic.fields import List
from superagi.controllers.types.agent_execution_config import AgentRunI... | Get all running state agents |
146,032 | from datetime import datetime
from typing import Optional, Union, List
from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from pydantic import BaseModel
from pydantic.fields import List
from superagi.controllers.types.agent_execution_config import AgentRunI... | Get latest executing agent details |
146,033 | from datetime import datetime
from typing import Optional
from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends, Request
from fastapi_jwt_auth import AuthJWT
from pydantic import BaseModel
from superagi.models.organisation import Organisation
from superagi.models.project import Project
from super... | Create a new user. Args: user (UserIn): User data. Returns: User: The created user. Raises: HTTPException (status_code=400): If there is an issue creating the user. |
146,034 | from datetime import datetime
from typing import Optional
from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends, Request
from fastapi_jwt_auth import AuthJWT
from pydantic import BaseModel
from superagi.models.organisation import Organisation
from superagi.models.project import Project
from super... | Get a particular user details. Args: user_id (int): ID of the user. Returns: User: The user details. Raises: HTTPException (status_code=404): If the user with the specified ID is not found. |
146,035 | from datetime import datetime
from typing import Optional
from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends, Request
from fastapi_jwt_auth import AuthJWT
from pydantic import BaseModel
from superagi.models.organisation import Organisation
from superagi.models.project import Project
from super... | Update a particular user. Args: user_id (int): ID of the user. user (UserIn): Updated user data. Returns: User: The updated user details. Raises: HTTPException (status_code=404): If the user with the specified ID is not found. |
146,036 | from datetime import datetime
from typing import Optional
from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends, Request
from fastapi_jwt_auth import AuthJWT
from pydantic import BaseModel
from superagi.models.organisation import Organisation
from superagi.models.project import Project
from super... | Update first login source of the user |
146,037 | import asyncio
from datetime import datetime
import time
from typing import Optional
from fastapi import APIRouter, BackgroundTasks
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from sqlalchemy.sql import asc
from superag... | Add a new agent execution feed. Args: agent_execution_feed (AgentExecutionFeed): The data for the agent execution feed. Returns: AgentExecutionFeed: The newly created agent execution feed. Raises: HTTPException (Status Code=404): If the associated agent execution is not found. |
146,038 | import asyncio
from datetime import datetime
import time
from typing import Optional
from fastapi import APIRouter, BackgroundTasks
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from sqlalchemy.sql import asc
from superag... | Get an agent execution feed by agent_execution_feed_id. Args: agent_execution_feed_id (int): The ID of the agent execution feed. Returns: AgentExecutionFeed: The agent execution feed with the specified ID. Raises: HTTPException (Status Code=404): If the agent execution feed is not found. |
146,039 | import asyncio
from datetime import datetime
import time
from typing import Optional
from fastapi import APIRouter, BackgroundTasks
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from sqlalchemy.sql import asc
from superag... | Update a particular agent execution feed. Args: agent_execution_feed_id (int): The ID of the agent execution feed to update. agent_execution_feed (AgentExecutionFeed): The updated agent execution feed. Returns: AgentExecutionFeed: The updated agent execution feed. Raises: HTTPException (Status Code=404): If the agent e... |
146,040 | import asyncio
from datetime import datetime
import time
from typing import Optional
from fastapi import APIRouter, BackgroundTasks
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from sqlalchemy.sql import asc
from superag... | Get agent execution feed with other execution details. Args: agent_execution_id (int): The ID of the agent execution. Returns: dict: The agent execution status and feeds. Raises: HTTPException (Status Code=400): If the agent run is not found. |
146,041 | import asyncio
from datetime import datetime
import time
from typing import Optional
from fastapi import APIRouter, BackgroundTasks
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from sqlalchemy.sql import asc
from superag... | Get agent execution tasks and completed tasks. Args: agent_execution_id (int): The ID of the agent execution. Returns: dict: The tasks and completed tasks for the agent execution. |
146,042 | import datetime
import os
from pathlib import Path
import boto3
from botocore.exceptions import NoCredentialsError
from fastapi import APIRouter
from fastapi import File, Form, UploadFile
from fastapi import HTTPException, Depends
from fastapi.responses import StreamingResponse
from fastapi_jwt_auth import AuthJWT
from... | Upload a file as a resource for an agent. Args: agent_id (int): ID of the agent. file (UploadFile): Uploaded file. name (str): Name of the resource. size (str): Size of the resource. type (str): Type of the resource. Returns: Resource: Uploaded resource. Raises: HTTPException (status_code=400): If the agent with the sp... |
146,043 | import datetime
import os
from pathlib import Path
import boto3
from botocore.exceptions import NoCredentialsError
from fastapi import APIRouter
from fastapi import File, Form, UploadFile
from fastapi import HTTPException, Depends
from fastapi.responses import StreamingResponse
from fastapi_jwt_auth import AuthJWT
from... | Get all resources for an agent. Args: agent_id (int): ID of the agent. Returns: List[Resource]: List of resources belonging to the agent. |
146,044 | import datetime
import os
from pathlib import Path
import boto3
from botocore.exceptions import NoCredentialsError
from fastapi import APIRouter
from fastapi import File, Form, UploadFile
from fastapi import HTTPException, Depends
from fastapi.responses import StreamingResponse
from fastapi_jwt_auth import AuthJWT
from... | Download a particular resource by resource_id. Args: resource_id (int): ID of the resource. Authorize (AuthJWT, optional): Authorization dependency. Returns: StreamingResponse: Streaming response for downloading the resource. Raises: HTTPException (status_code=400): If the resource with the specified ID is not found. H... |
146,045 | from fastapi import APIRouter
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from superagi.helper.auth import check_auth
from superagi.models.budget import Budget
class BudgetIn(BaseModel):
budget: float
cycle: str... | Create a new budget. Args: budget: Budget details. Returns: Budget: Created budget. |
146,046 | from fastapi import APIRouter
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from superagi.helper.auth import check_auth
from superagi.models.budget import Budget
def check_auth(Authorize: AuthJWT = Depends()):
"""
... | Get a budget by budget_id. Args: budget_id: Budget ID. Returns: Budget: Retrieved budget. |
146,047 | from fastapi import APIRouter
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from superagi.helper.auth import check_auth
from superagi.models.budget import Budget
class BudgetIn(BaseModel):
budget: float
cycle: str... | Update budget details by budget_id. Args: budget_id: Budget ID. budget: Updated budget details. Returns: Budget: Updated budget. |
146,048 | from typing import Optional
from fastapi import APIRouter, Depends, HTTPException, Query, Body
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.helper.models_helper import ModelsHelper
from superagi.apm.call_log_helper import CallLogHelper
from superagi.lib.logger import logger
from supe... | null |
146,049 | from typing import Optional
from fastapi import APIRouter, Depends, HTTPException, Query, Body
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.helper.models_helper import ModelsHelper
from superagi.apm.call_log_helper import CallLogHelper
from superagi.lib.logger import logger
from supe... | null |
146,050 | from typing import Optional
from fastapi import APIRouter, Depends, HTTPException, Query, Body
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.helper.models_helper import ModelsHelper
from superagi.apm.call_log_helper import CallLogHelper
from superagi.lib.logger import logger
from supe... | null |
146,051 | from typing import Optional
from fastapi import APIRouter, Depends, HTTPException, Query, Body
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.helper.models_helper import ModelsHelper
from superagi.apm.call_log_helper import CallLogHelper
from superagi.lib.logger import logger
from supe... | null |
146,052 | from typing import Optional
from fastapi import APIRouter, Depends, HTTPException, Query, Body
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.helper.models_helper import ModelsHelper
from superagi.apm.call_log_helper import CallLogHelper
from superagi.lib.logger import logger
from supe... | null |
146,053 | from typing import Optional
from fastapi import APIRouter, Depends, HTTPException, Query, Body
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.helper.models_helper import ModelsHelper
from superagi.apm.call_log_helper import CallLogHelper
from superagi.lib.logger import logger
from supe... | null |
146,054 | from typing import Optional
from fastapi import APIRouter, Depends, HTTPException, Query, Body
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.helper.models_helper import ModelsHelper
from superagi.apm.call_log_helper import CallLogHelper
from superagi.lib.logger import logger
from supe... | null |
146,055 | from typing import Optional
from fastapi import APIRouter, Depends, HTTPException, Query, Body
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.helper.models_helper import ModelsHelper
from superagi.apm.call_log_helper import CallLogHelper
from superagi.lib.logger import logger
from supe... | null |
146,056 | from typing import Optional
from fastapi import APIRouter, Depends, HTTPException, Query, Body
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.helper.models_helper import ModelsHelper
from superagi.apm.call_log_helper import CallLogHelper
from superagi.lib.logger import logger
from supe... | Get Marketplace Model list. Args: page (int, optional): The page number for pagination. Defaults to None. Returns: dict: The response containing the marketplace list. |
146,057 | from typing import Optional
from fastapi import APIRouter, Depends, HTTPException, Query, Body
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.helper.models_helper import ModelsHelper
from superagi.apm.call_log_helper import CallLogHelper
from superagi.lib.logger import logger
from supe... | null |
146,058 | from typing import Optional
from fastapi import APIRouter, Depends, HTTPException, Query, Body
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.helper.models_helper import ModelsHelper
from superagi.apm.call_log_helper import CallLogHelper
from superagi.lib.logger import logger
from supe... | Get Marketplace Model list. Args: page (int, optional): The page number for pagination. Defaults to None. Returns: dict: The response containing the marketplace list. |
146,059 | from typing import Optional
from fastapi import APIRouter, Depends, HTTPException, Query, Body
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.helper.models_helper import ModelsHelper
from superagi.apm.call_log_helper import CallLogHelper
from superagi.lib.logger import logger
from supe... | null |
146,060 | from fastapi import APIRouter, Depends, HTTPException
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.apm.analytics_helper import AnalyticsHelper
from superagi.apm.event_handler import EventHandler
from superagi.apm.tools_handler import ToolsHandler
from superagi.apm.knowledge_handler i... | Get the total tokens, total calls, and the number of run completed. Returns: metrics: dictionary containing total tokens, total calls, and the number of runs completed. |
146,061 | from fastapi import APIRouter, Depends, HTTPException
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.apm.analytics_helper import AnalyticsHelper
from superagi.apm.event_handler import EventHandler
from superagi.apm.tools_handler import ToolsHandler
from superagi.apm.knowledge_handler i... | null |
146,062 | from fastapi import APIRouter, Depends, HTTPException
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.apm.analytics_helper import AnalyticsHelper
from superagi.apm.event_handler import EventHandler
from superagi.apm.tools_handler import ToolsHandler
from superagi.apm.knowledge_handler i... | null |
146,063 | from fastapi import APIRouter, Depends, HTTPException
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.apm.analytics_helper import AnalyticsHelper
from superagi.apm.event_handler import EventHandler
from superagi.apm.tools_handler import ToolsHandler
from superagi.apm.knowledge_handler i... | null |
146,064 | from fastapi import APIRouter, Depends, HTTPException
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.apm.analytics_helper import AnalyticsHelper
from superagi.apm.event_handler import EventHandler
from superagi.apm.tools_handler import ToolsHandler
from superagi.apm.knowledge_handler i... | null |
146,065 | from fastapi import APIRouter, Depends, HTTPException
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.apm.analytics_helper import AnalyticsHelper
from superagi.apm.event_handler import EventHandler
from superagi.apm.tools_handler import ToolsHandler
from superagi.apm.knowledge_handler i... | null |
146,066 | from fastapi import APIRouter, Depends, HTTPException
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.apm.analytics_helper import AnalyticsHelper
from superagi.apm.event_handler import EventHandler
from superagi.apm.tools_handler import ToolsHandler
from superagi.apm.knowledge_handler i... | null |
146,067 | from fastapi import APIRouter, Depends, HTTPException
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.apm.analytics_helper import AnalyticsHelper
from superagi.apm.event_handler import EventHandler
from superagi.apm.tools_handler import ToolsHandler
from superagi.apm.knowledge_handler i... | null |
146,068 | from fastapi import APIRouter, Depends, HTTPException
from superagi.helper.auth import check_auth, get_user_organisation
from superagi.apm.analytics_helper import AnalyticsHelper
from superagi.apm.event_handler import EventHandler
from superagi.apm.tools_handler import ToolsHandler
from superagi.apm.knowledge_handler i... | null |
146,069 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends, Query, status
from fastapi import APIRouter
from datetime import datetime
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.models.knowledges import Knowledges
from superagi.mod... | Get Marketplace Knowledge list. Args: page (int, optional): The page number for pagination. Defaults to None. Returns: dict: The response containing the marketplace list. |
146,070 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends, Query, status
from fastapi import APIRouter
from datetime import datetime
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.models.knowledges import Knowledges
from superagi.mod... | null |
146,071 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends, Query, status
from fastapi import APIRouter
from datetime import datetime
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.models.knowledges import Knowledges
from superagi.mod... | null |
146,072 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends, Query, status
from fastapi import APIRouter
from datetime import datetime
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.models.knowledges import Knowledges
from superagi.mod... | null |
146,073 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends, Query, status
from fastapi import APIRouter
from datetime import datetime
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.models.knowledges import Knowledges
from superagi.mod... | null |
146,074 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends, Query, status
from fastapi import APIRouter
from datetime import datetime
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.models.knowledges import Knowledges
from superagi.mod... | null |
146,075 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends, Query, status
from fastapi import APIRouter
from datetime import datetime
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.models.knowledges import Knowledges
from superagi.mod... | null |
146,076 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends, Query, status
from fastapi import APIRouter
from datetime import datetime
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.models.knowledges import Knowledges
from superagi.mod... | null |
146,077 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends, Query, status
from fastapi import APIRouter
from datetime import datetime
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.models.knowledges import Knowledges
from superagi.mod... | null |
146,078 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends, Query, status
from fastapi import APIRouter
from datetime import datetime
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.models.knowledges import Knowledges
from superagi.mod... | null |
146,079 | from datetime import datetime
from fastapi import APIRouter
from fastapi import HTTPException, Depends
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from main import get_config
from superagi.controllers.types.agent_execution_config import AgentRunIn
from superagi.controllers.types.agent_publish_confi... | Get the details of a specific agent template. Args: template_source (str): The source of the agent template ("local" or "marketplace"). agent_template_id (int): The ID of the agent template. organisation (Depends): Dependency to get the user organisation. Returns: dict: The details of the agent template. Raises: HTTPEx... |
146,080 | from datetime import datetime
from fastapi import APIRouter
from fastapi import HTTPException, Depends
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from main import get_config
from superagi.controllers.types.agent_execution_config import AgentRunIn
from superagi.controllers.types.agent_publish_confi... | Update the details of an agent template. Args: agent_template_id (int): The ID of the agent template to update. updated_agent_configs (dict): The updated agent configurations. organisation (Depends): Dependency to get the user organisation. Returns: HTTPException (status_code=200): If the agent gets successfully edited... |
146,081 | from datetime import datetime
from fastapi import APIRouter
from fastapi import HTTPException, Depends
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from main import get_config
from superagi.controllers.types.agent_execution_config import AgentRunIn
from superagi.controllers.types.agent_publish_confi... | Save an agent as a template. Args: agent_id (str): The ID of the agent to save as a template. agent_execution_id (str): The ID of the agent execution to save as a template. organisation (Depends): Dependency to get the user organisation. Returns: dict: The saved agent template. Raises: HTTPException (status_code=404): ... |
146,082 | from datetime import datetime
from fastapi import APIRouter
from fastapi import HTTPException, Depends
from fastapi_sqlalchemy import db
from pydantic import BaseModel
from main import get_config
from superagi.controllers.types.agent_execution_config import AgentRunIn
from superagi.controllers.types.agent_publish_confi... | List agent templates. Args: template_source (str, optional): The source of the templates ("local" or "marketplace"). Defaults to "local". search_str (str, optional): The search string to filter templates. Defaults to "". page (int, optional): The page number for paginated results. Defaults to 0. organisation (Depends):... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.