id int64 0 190k | prompt stringlengths 21 13.4M | docstring stringlengths 1 12k ⌀ |
|---|---|---|
146,083 | 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 all marketplace agent templates. Args: page (int, optional): The page number for paginated results. Defaults to 0. Returns: list: A list of marketplace agent templates. |
146,084 | 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 marketplace template details. Args: agent_template_id (int): The ID of the marketplace agent template. Returns: dict: A dictionary containing the marketplace template details. |
146,085 | 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... | Create a new agent with configurations. Args: agent_template_id (int): The ID of the agent template. organisation: User's organisation. Returns: dict: A dictionary containing the details of the downloaded template. |
146,086 | 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... | Fetches agent configuration from a template. Args: agent_template_id (int): The ID of the agent template. organisation: User's organisation. Returns: dict: A dictionary containing the agent configuration fetched from the template. Raises: HTTPException: If the template is not found. |
146,087 | 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... | Publish an agent execution as a template. Args: agent_execution_id (str): The ID of the agent execution to save as a template. organisation (Depends): Dependency to get the user organisation. user (Depends): Dependency to get the user. Returns: dict: The saved agent template. Raises: HTTPException (status_code=404): If... |
146,088 | 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... | Publish a template from edit template page. Args: organisation (Depends): Dependency to get the user organisation. user (Depends): Dependency to get the user. Returns: dict: The saved agent template. Raises: HTTPException (status_code=404): If the agent template or workflow are not found. |
146,089 | from typing import Optional
import requests
from fastapi import APIRouter, Body
from fastapi import HTTPException, Depends, Query
from fastapi_sqlalchemy import db
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.helper.tool_helper import get_readme_cont... | Get marketplace tool kits. Args: page (int): The page number for pagination. Returns: list: A list of tool kits in the marketplace. |
146,090 | from typing import Optional
import requests
from fastapi import APIRouter, Body
from fastapi import HTTPException, Depends, Query
from fastapi_sqlalchemy import db
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.helper.tool_helper import get_readme_cont... | Get tool kit details from the marketplace. Args: toolkit_name (str): The name of the tool kit. Returns: Toolkit: The tool kit details from the marketplace. |
146,091 | from typing import Optional
import requests
from fastapi import APIRouter, Body
from fastapi import HTTPException, Depends, Query
from fastapi_sqlalchemy import db
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.helper.tool_helper import get_readme_cont... | Get tool kit readme from the marketplace. Args: toolkit_name (str): The name of the tool kit. Returns: str: The content of the tool kit's readme file. Raises: HTTPException (status_code=404): If the specified tool kit is not found. |
146,092 | from typing import Optional
import requests
from fastapi import APIRouter, Body
from fastapi import HTTPException, Depends, Query
from fastapi_sqlalchemy import db
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.helper.tool_helper import get_readme_cont... | Get tools of a specific tool kit from the marketplace. Args: toolkit_name (str): The name of the tool kit. Returns: Tool: The tools associated with the tool kit. Raises: HTTPException (status_code=404): If the specified tool kit is not found. |
146,093 | from typing import Optional
import requests
from fastapi import APIRouter, Body
from fastapi import HTTPException, Depends, Query
from fastapi_sqlalchemy import db
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.helper.tool_helper import get_readme_cont... | Download and install a tool kit from the marketplace. Args: toolkit_name (str): The name of the tool kit. organisation (Organisation): The user's organisation. Returns: dict: A message indicating the successful installation of the tool kit. |
146,094 | from typing import Optional
import requests
from fastapi import APIRouter, Body
from fastapi import HTTPException, Depends, Query
from fastapi_sqlalchemy import db
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.helper.tool_helper import get_readme_cont... | Get details of a locally installed tool kit by its name, including the details of its tools. Args: toolkit_name (str): The name of the tool kit. organisation (Organisation): The user's organisation. Returns: Toolkit: The tool kit object with its associated tools. Raises: HTTPException (status_code=404): If the specifie... |
146,095 | from typing import Optional
import requests
from fastapi import APIRouter, Body
from fastapi import HTTPException, Depends, Query
from fastapi_sqlalchemy import db
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.helper.tool_helper import get_readme_cont... | Install a tool locally from a GitHub link. Args: github_link_request (GitHubLinkRequest): The GitHub link request object. organisation (Organisation): The user's organisation. Returns: None Raises: HTTPException (status_code=400): If the GitHub link is invalid. |
146,096 | from typing import Optional
import requests
from fastapi import APIRouter, Body
from fastapi import HTTPException, Depends, Query
from fastapi_sqlalchemy import db
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.helper.tool_helper import get_readme_cont... | Get the readme content of a toolkit. Args: toolkit_name (str): The name of the toolkit. organisation (Organisation): The user's organisation. Returns: str: The readme content of the toolkit. Raises: HTTPException (status_code=404): If the toolkit is not found. |
146,097 | from typing import Optional
import requests
from fastapi import APIRouter, Body
from fastapi import HTTPException, Depends, Query
from fastapi_sqlalchemy import db
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.helper.tool_helper import get_readme_cont... | Handle marketplace operations. Args: search_str (str, optional): The search string to filter toolkits. Defaults to None. toolkit_name (str, optional): The name of the toolkit. Defaults to None. Returns: dict: The response containing the marketplace details. |
146,098 | from typing import Optional
import requests
from fastapi import APIRouter, Body
from fastapi import HTTPException, Depends, Query
from fastapi_sqlalchemy import db
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.helper.tool_helper import get_readme_cont... | Handle marketplace operation list. Args: page (int, optional): The page number for pagination. Defaults to None. Returns: dict: The response containing the marketplace list. |
146,099 | from typing import Optional
import requests
from fastapi import APIRouter, Body
from fastapi import HTTPException, Depends, Query
from fastapi_sqlalchemy import db
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.helper.tool_helper import get_readme_cont... | Get the list of installed tool kits. Args: organisation (Organisation): The organisation associated with the tool kits. Returns: list: The list of installed tool kits. |
146,100 | from typing import Optional
import requests
from fastapi import APIRouter, Body
from fastapi import HTTPException, Depends, Query
from fastapi_sqlalchemy import db
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.helper.tool_helper import get_readme_cont... | Check if there is an update available for the installed tool kits. Returns: dict: The response containing the update details. |
146,101 | from typing import Optional
import requests
from fastapi import APIRouter, Body
from fastapi import HTTPException, Depends, Query
from fastapi_sqlalchemy import db
from superagi.config.config import get_config
from superagi.helper.auth import get_user_organisation
from superagi.helper.tool_helper import get_readme_cont... | Update the toolkit with the latest version from the marketplace. |
146,102 | from fastapi import APIRouter, 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.helper.auth import get_user_organisation
from superagi.models.organisation import Organisation
from supera... | Update tool configurations for a specific tool kit. Args: toolkit_name (str): The name of the tool kit. configs (list): A list of dictionaries containing the tool configurations. Each dictionary should have the following keys: - "key" (str): The key of the configuration. - "value" (str): The new value for the configura... |
146,103 | from fastapi import APIRouter, 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.helper.auth import get_user_organisation
from superagi.models.organisation import Organisation
from supera... | Create or update tool configurations for a specific tool kit. Args: toolkit_name (str): The name of the tool kit. tool_configs (list): A list of tool configuration objects. Returns: Toolkit: The updated tool kit object. Raises: HTTPException (status_code=404): If the specified tool kit is not found. |
146,104 | from fastapi import APIRouter, 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.helper.auth import get_user_organisation
from superagi.models.organisation import Organisation
from supera... | Get all tool configurations by Tool Kit Name. Args: toolkit_name (str): The name of the tool kit. organisation (Organisation): The organization associated with the user. Returns: list: A list of tool configurations for the specified tool kit. Raises: HTTPException (status_code=404): If the specified tool kit is not fou... |
146,105 | from fastapi import APIRouter, 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.helper.auth import get_user_organisation
from superagi.models.organisation import Organisation
from supera... | Get a specific tool configuration by tool kit name and key. Args: toolkit_name (str): The name of the tool kit. key (str): The key of the tool configuration. organisation (Organisation): The organization associated with the user. Returns: ToolConfig: The tool configuration with the specified key. Raises: HTTPException ... |
146,106 | from datetime import datetime
from typing import Annotated
from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends, Body
from fastapi_jwt_auth import AuthJWT
from pydantic import BaseModel
from superagi.models.agent_execution import AgentExecution
from superagi.models.agent_execution_permission imp... | Get an agent execution permission by its ID. Args: agent_execution_permission_id (int): The ID of the agent execution permission. Authorize (AuthJWT, optional): Authentication object. Defaults to Depends(check_auth). Raises: HTTPException: If the agent execution permission is not found. Returns: AgentExecutionPermissio... |
146,107 | from datetime import datetime
from typing import Annotated
from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends, Body
from fastapi_jwt_auth import AuthJWT
from pydantic import BaseModel
from superagi.models.agent_execution import AgentExecution
from superagi.models.agent_execution_permission imp... | Create a new agent execution permission. Args: agent_execution_permission : An instance of AgentExecutionPermission model as json. Authorize (AuthJWT, optional): Authorization token, by default depends on the check_auth function. Returns: new_agent_execution_permission: A newly created agent execution permission instan... |
146,108 | from datetime import datetime
from typing import Annotated
from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends, Body
from fastapi_jwt_auth import AuthJWT
from pydantic import BaseModel
from superagi.models.agent_execution import AgentExecution
from superagi.models.agent_execution_permission imp... | Update an AgentExecutionPermission in the database. Given an agent_execution_permission_id and the updated agent_execution_permission, this function updates the corresponding AgentExecutionPermission in the database. If the AgentExecutionPermission is not found, an HTTPException is raised. Args: agent_execution_permiss... |
146,109 | from datetime import datetime
from typing import Annotated
from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends, Body
from fastapi_jwt_auth import AuthJWT
from pydantic import BaseModel
from superagi.models.agent_execution import AgentExecution
from superagi.models.agent_execution_permission imp... | Update the execution permission status of an agent in the database. This function updates the execution permission status of an agent in the database. The status can be either "APPROVED" or "REJECTED". The function also updates the user feedback if provided, commits the changes to the database, and enqueues the agent f... |
146,110 | 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 get_user_organisation
from superagi.helper.auth import check_auth
from superagi.he... | Create a new organisation. Args: organisation: Organisation data. Returns: dict: Dictionary containing the created organisation. Raises: HTTPException (status_code=400): If there is an issue creating the organisation. |
146,111 | 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 get_user_organisation
from superagi.helper.auth import check_auth
from superagi.he... | Get organisation details by organisation_id. Args: organisation_id: ID of the organisation. Returns: dict: Dictionary containing the organisation details. Raises: HTTPException (status_code=404): If the organisation with the specified ID is not found. |
146,112 | 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 get_user_organisation
from superagi.helper.auth import check_auth
from superagi.he... | Update organisation details by organisation_id. Args: organisation_id: ID of the organisation. organisation: Updated organisation data. Returns: dict: Dictionary containing the updated organisation details. Raises: HTTPException (status_code=404): If the organisation with the specified ID is not found. |
146,113 | 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 get_user_organisation
from superagi.helper.auth import check_auth
from superagi.he... | Get organisations associated with a user.If Organisation does not exists a new organisation is created Args: user_id: ID of the user. Returns: dict: Dictionary containing the organisation details. Raises: HTTPException (status_code=400): If the user with the specified ID is not found. |
146,114 | 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 get_user_organisation
from superagi.helper.auth import check_auth
from superagi.he... | Get all the llm models associated with an organisation. Args: organisation: Organisation data. |
146,115 | 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 get_user_organisation
from superagi.helper.auth import check_auth
from superagi.he... | Get all the agent workflows Args: organisation: Organisation data. |
146,116 | import ast
import json
from fastapi import APIRouter
from fastapi import HTTPException, Depends
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
from typing import Optional, Union
from sqlalchemy import func, or_
from sqlalchemy import desc
from superagi.helper.auth import check_auth
from superagi... | Get the agent configuration using the agent ID and the agent execution ID. Args: agent_id (int): Identifier of the agent. agent_execution_id (int): Identifier of the agent execution. Authorize (AuthJWT, optional): Authorization dependency. Defaults to Depends(check_auth). Returns: dict: Agent configuration including it... |
146,117 | import http.client as http_client
import json
from fastapi import APIRouter
from fastapi import Depends, Query
from fastapi.responses import RedirectResponse
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
import superagi
from superagi.helper.auth import get_current_user, check_auth
from superagi... | null |
146,118 | import http.client as http_client
import json
from fastapi import APIRouter
from fastapi import Depends, Query
from fastapi.responses import RedirectResponse
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
import superagi
from superagi.helper.auth import get_current_user, check_auth
from superagi... | null |
146,119 | import http.client as http_client
import json
from fastapi import APIRouter
from fastapi import Depends, Query
from fastapi.responses import RedirectResponse
from fastapi_jwt_auth import AuthJWT
from fastapi_sqlalchemy import db
import superagi
from superagi.helper.auth import get_current_user, check_auth
from superagi... | null |
146,120 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends, Query, status
from fastapi import APIRouter
from superagi.config.config import get_config
from superagi.models.marketplace_stats import MarketPlaceStats
from superagi.models.vector_dbs import Vectordbs
class MarketPlaceStats(DBBaseModel):
... | null |
146,121 | import json
import uuid
from fastapi import APIRouter, Body
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 get_user_organisation, validate_api_key
from superagi.helper.auth import check_aut... | null |
146,122 | import json
import uuid
from fastapi import APIRouter, Body
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 get_user_organisation, validate_api_key
from superagi.helper.auth import check_aut... | null |
146,123 | import json
import uuid
from fastapi import APIRouter, Body
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 get_user_organisation, validate_api_key
from superagi.helper.auth import check_aut... | null |
146,124 | import json
import uuid
from fastapi import APIRouter, Body
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 get_user_organisation, validate_api_key
from superagi.helper.auth import check_aut... | null |
146,125 | import json
import uuid
from fastapi import APIRouter, Body
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 get_user_organisation, validate_api_key
from superagi.helper.auth import check_aut... | null |
146,126 | from datetime import datetime
from typing import Optional
from fastapi import APIRouter, HTTPException
from fastapi import 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... | Creates a new webhook Args: Returns: Agent: An object of Agent representing the created Agent. Raises: HTTPException (Status Code=404): If the associated project is not found. |
146,127 | from datetime import datetime
from typing import Optional
from fastapi import APIRouter, HTTPException
from fastapi import 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... | Retrieves a single webhook for the authenticated user's organisation. Returns: JSONResponse: A JSON response containing the retrieved webhook. Raises: |
146,128 | from datetime import datetime
from typing import Optional
from fastapi import APIRouter, HTTPException
from fastapi import 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... | Soft-deletes a webhook by setting the value of is_deleted to True. Args: webhook_id (int): The ID of the webhook to delete. Returns: WebHookOut: The deleted webhook. Raises: HTTPException (Status Code=404): If the webhook is not found. |
146,129 | from fastapi_sqlalchemy import db
from fastapi import HTTPException, Depends, Query, status
from fastapi import APIRouter
from superagi.config.config import get_config
from superagi.helper.auth import check_auth
from superagi.models.knowledge_configs import KnowledgeConfigs
from fastapi_jwt_auth import AuthJWT
class K... | null |
146,130 | from __future__ import absolute_import
import sys
from sqlalchemy.orm import sessionmaker
from superagi.helper.tool_helper import handle_tools_import
from superagi.lib.logger import logger
from datetime import timedelta
from celery import Celery
from superagi.config.config import get_config
from superagi.helper.agent_s... | null |
146,131 | from __future__ import absolute_import
import sys
from sqlalchemy.orm import sessionmaker
from superagi.helper.tool_helper import handle_tools_import
from superagi.lib.logger import logger
from datetime import timedelta
from celery import Celery
from superagi.config.config import get_config
from superagi.helper.agent_s... | Check if wait time of wait workflow step is over and can be resumed. |
146,132 | from __future__ import absolute_import
import sys
from sqlalchemy.orm import sessionmaker
from superagi.helper.tool_helper import handle_tools_import
from superagi.lib.logger import logger
from datetime import timedelta
from celery import Celery
from superagi.config.config import get_config
from superagi.helper.agent_s... | Executing agent scheduling in the background. |
146,133 | from datetime import datetime
def parse_interval_to_seconds(interval: str) -> int:
units = {"Minutes": 60, "Hours": 3600, "Days": 86400, "Weeks": 604800, "Months": 2592000}
interval = ' '.join(interval.split())
value, unit = interval.split(" ")
return int(value) * units[unit] | null |
146,134 | import csv
import pandas as pd
import chardet
from superagi.lib.logger import logger
logger = Logger('Super AGI')
def correct_csv_encoding(file_path):
with open(file_path, 'rb') as f:
result = chardet.detect(f.read())
encoding = result['encoding']
if encoding != 'utf-8':
data = []
... | null |
146,135 | import importlib.util
import inspect
import json
import os
import sys
import zipfile
from urllib.parse import urlparse
import requests
from superagi.config.config import get_config
from superagi.lib.logger import logger
from superagi.models.tool import Tool
from superagi.models.tool_config import ToolConfig
from supera... | null |
146,136 | from __future__ import annotations
from abc import abstractmethod
from typing import Any, Dict, Iterable, List, Optional, Tuple
import weaviate
from uuid import uuid4
from superagi.vector_store.base import VectorStore
from superagi.vector_store.document import Document
import weaviate
The provided code snippet includ... | Creates a Weaviate client instance. Args: use_embedded: Whether to use the embedded Weaviate instance. Defaults to True. url: The URL of the Weaviate instance to connect to. Required if `use_embedded` is False. api_key: The API key to use for authentication if using Weaviate Cloud Services. Optional. Returns: A Weaviat... |
146,137 | import uuid
from typing import Any, Optional, Iterable, List
import chromadb
from chromadb import Settings
from superagi.config.config import get_config
from superagi.vector_store.base import VectorStore
from superagi.vector_store.document import Document
from superagi.vector_store.embedding.base import BaseEmbedding
... | null |
146,138 | from __future__ import annotations
import uuid
from mimetypes import common_types
from typing import Any, Dict, Iterable, List, Optional, Tuple, Sequence, Union
from qdrant_client import QdrantClient
from qdrant_client.http import models
from qdrant_client.conversions import common_types
from qdrant_client.models impor... | null |
146,139 | import json
from superagi.agent.common_types import TaskExecutorResponse, ToolExecutorResponse
from superagi.agent.output_parser import AgentSchemaOutputParser
from superagi.agent.task_queue import TaskQueue
from superagi.agent.tool_executor import ToolExecutor
from superagi.helper.json_cleaner import JsonCleaner
from ... | null |
146,140 | import random
from typing import List
import httpx
from bs4 import BeautifulSoup
from pydantic import BaseModel
from superagi.lib.logger import logger
def search(query):
"""
Gets the raw HTML of a searx search result page
Args:
query : The query to search for.
"""
# TODO: use a better strate... | Returns a text summary of the search results via the SearchResult.__str__ method |
146,141 | from abc import abstractmethod
from functools import wraps
from inspect import signature
from typing import List
from typing import Optional, Type, Callable, Any, Union, Dict, Tuple
import yaml
from pydantic import BaseModel, create_model, validate_arguments, Extra
from superagi.models.tool_config import ToolConfig
fro... | Create a pydantic schema from a function's signature. |
146,142 | from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
def upgrade() -> None:
op.create_table('events',
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('id', sa.Integer(), nullable=False),
sa.... | null |
146,143 | from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
def downgrade() -> None:
op.drop_index(op.f('ix_events_event_property'), table_name='events')
op.drop_index(op.f('ix_events_org_id'), table_name='events')
op.drop_index(op.f('ix_events_agent_id'), table_name='events')... | null |
146,144 | from alembic import op
import sqlalchemy as sa
from sqlalchemy.engine import Inspector
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('agent_template_steps',
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.C... | null |
146,145 | from alembic import op
import sqlalchemy as sa
from sqlalchemy.engine import Inspector
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('agents', 'agent_template_id')
op.add_column('agent_executions', sa.Column('name', sa.VARCHAR(), autoincrement=False, ... | null |
146,146 | from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
def upgrade() -> None:
op.create_table('agent_workflows',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(), nullable=True),
sa.Column('de... | null |
146,147 | from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
def downgrade() -> None:
op.drop_table('agent_workflows')
op.drop_table('agent_workflow_steps')
op.drop_table('agent_workflow_step_tools') | null |
146,148 | from alembic import op
import sqlalchemy as sa
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('api_keys',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('org_id', sa.Integer(), nullable=True),
sa.Column('name', sa.String(), nullable=Tr... | null |
146,149 | from alembic import op
import sqlalchemy as sa
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('webhooks')
op.drop_table('api_keys')
op.drop_table('webhook_events')
# ### end Alembic commands ### | null |
146,150 | from alembic import op
import sqlalchemy as sa
def upgrade() -> None:
op.add_column('agent_templates', sa.Column('marketplace_template_id', sa.Integer(), nullable=True)) | null |
146,151 | from alembic import op
import sqlalchemy as sa
def downgrade() -> None:
op.drop_column('agent_templates', sa.Column('marketplace_template_id', sa.Integer(), nullable=True)) | null |
146,152 | from alembic import op
import sqlalchemy as sa
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('webhooks', sa.Column('filters', sa.JSON(), nullable=True))
# ### end Alembic commands ### | null |
146,153 | from alembic import op
import sqlalchemy as sa
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('webhooks', 'filters')
# ### end Alembic commands ### | null |
146,154 | from alembic import op
import sqlalchemy as sa
def upgrade() -> None:
op.add_column('agent_execution_permissions', sa.Column('question', sa.Text(), nullable=True)) | null |
146,155 | from alembic import op
import sqlalchemy as sa
def downgrade() -> None:
op.drop_column('agent_execution_permissions', "question") | null |
146,156 | from alembic import op
import sqlalchemy as sa
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('knowledge_configs',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('knowledge_id', sa.Integer(), nullable=False),
sa.Col... | null |
146,157 | from alembic import op
import sqlalchemy as sa
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('vector_dbs')
op.drop_table('vector_db_indices')
op.drop_table('vector_db_configs')
op.drop_table('knowledges')
op.drop_table('knowledge_configs') | null |
146,158 | from alembic import op
import sqlalchemy as sa
def upgrade() -> None:
op.add_column('agent_executions',
sa.Column('current_feed_group_id', sa.String(), nullable=True, server_default="DEFAULT"))
op.add_column('agent_execution_feeds', sa.Column('feed_group_id', sa.String(), nullable=True)) | null |
146,159 | from alembic import op
import sqlalchemy as sa
def downgrade() -> None:
op.drop_column('agent_executions', 'current_feed_group_id')
op.drop_column('agent_execution_feeds', 'feed_group_id') | null |
146,160 | from alembic import op
import sqlalchemy as sa
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('call_logs',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('agent_execution_name', sa.String(), nullable=False),
sa.Column('agent_id', sa.In... | null |
146,161 | from alembic import op
import sqlalchemy as sa
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('call_logs')
# ### end Alembic commands ### | null |
146,162 | from alembic import op
import sqlalchemy as sa
def upgrade() -> None:
op.rename_table('agent_templates', 'agent_workflows')
op.rename_table('agent_template_steps', 'agent_workflow_steps')
with op.batch_alter_table('agent_workflow_steps') as bop:
bop.alter_column('agent_template_id', new_column_name... | null |
146,163 | from alembic import op
import sqlalchemy as sa
def downgrade() -> None:
op.rename_table('agent_workflows', 'agent_templates')
op.rename_table('agent_workflow_steps', 'agent_template_steps')
with op.batch_alter_table('agent_templates') as bop:
bop.alter_column('agent_workflow_id', new_column_name='a... | null |
146,164 | from alembic import op
import sqlalchemy as sa
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ##
op.add_column('resources', sa.Column('summary', sa.Text(), nullable=True))
# ### end Alembic commands ### | null |
146,165 | from alembic import op
import sqlalchemy as sa
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('resources', 'summary')
# ### end Alembic commands ### | null |
146,166 | from alembic import op
import sqlalchemy as sa
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('models_config',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('provider', sa.String(), nullable=False),
sa.Column('api_key', sa.String(), n... | null |
146,167 | from alembic import op
import sqlalchemy as sa
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('models_config')
# ### end Alembic commands ### | null |
146,168 | from alembic import op
import sqlalchemy as sa
def upgrade() -> None:
op.add_column('agents', sa.Column('is_deleted', sa.Boolean(), nullable=True, server_default=sa.false())) | null |
146,169 | from alembic import op
import sqlalchemy as sa
def downgrade() -> None:
op.drop_column('agents', 'is_deleted') | null |
146,170 | from alembic import op
import sqlalchemy as sa
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('resources',
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('id', sa.Integer()... | null |
146,171 | from alembic import op
import sqlalchemy as sa
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('agent_executions', 'name')
op.drop_column('agent_execution_feeds', 'extra_info')
op.drop_table('resources')
# ### end Alembic commands ### | null |
146,172 | from alembic import op
import sqlalchemy as sa
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('agent_executions', sa.Column('num_of_calls', sa.Integer(), nullable=True))
op.add_column('agent_executions', sa.Column('num_of_tokens', sa.Integer(), nullable=T... | null |
146,173 | from alembic import op
import sqlalchemy as sa
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('agent_executions', sa.Column('tokens', sa.INTEGER(), autoincrement=False, nullable=True))
op.add_column('agent_executions', sa.Column('calls', sa.INTEGER(), a... | null |
146,174 | from alembic import op
import sqlalchemy as sa
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('toolkits',
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('id', sa.Integer(),... | null |
146,175 | from alembic import op
import sqlalchemy as sa
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('tools', 'toolkit_id')
op.drop_column('tools', 'description')
op.add_column('tool_configs', sa.Column('agent_id', sa.INTEGER(), autoincrement=False, nulla... | null |
146,176 | from alembic import op
import sqlalchemy as sa
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('agent_executions', sa.Column('calls', sa.Integer(), nullable=True))
op.add_column('agent_executions', sa.Column('tokens', sa.Integer(), nullable=True))
# ##... | null |
146,177 | from alembic import op
import sqlalchemy as sa
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('agent_executions', 'tokens')
op.drop_column('agent_executions', 'calls')
# ### end Alembic commands ### | null |
146,178 | from alembic import op
import sqlalchemy as sa
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('agent_execution_configs',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('agent_execution_id', sa.Integer(), nullable=True),
sa.Column('key'... | null |
146,179 | from alembic import op
import sqlalchemy as sa
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('agent_execution_configs')
# ### end Alembic commands ### | null |
146,180 | from alembic import op
import sqlalchemy as sa
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('tool_configs', sa.Column('key_type', sa.String(), nullable=True))
op.add_column('tool_configs', sa.Column('is_secret', sa.Boolean(), nullable=True))
op.add_... | null |
146,181 | from alembic import op
import sqlalchemy as sa
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('tool_configs', 'is_required')
op.drop_column('tool_configs', 'is_secret')
op.drop_column('tool_configs', 'key_type')
# ### end Alembic commands ### | null |
146,182 | from alembic import op
import sqlalchemy as sa
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('agent_execution_permissions',
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column(... | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.