mirror of https://github.com/kortix-ai/suna.git
feat: removed unused imports
This commit is contained in:
parent
5580c33329
commit
c01508d56f
|
@ -4,8 +4,8 @@ import base64
|
|||
import aiohttp
|
||||
import asyncio
|
||||
import logging
|
||||
from typing import Optional, Dict, Any, Union
|
||||
from PIL import Image
|
||||
from typing import Optional, Dict
|
||||
import os
|
||||
|
||||
from agentpress.tool import Tool, ToolResult, openapi_schema, xml_schema
|
||||
from sandbox.sandbox import SandboxToolsBase, Sandbox
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from typing import Dict, Optional
|
||||
from typing import Dict
|
||||
|
||||
from agent.tools.data_providers.RapidDataProviderBase import RapidDataProviderBase, EndpointSchema
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import os
|
||||
from typing import List, Optional, Union
|
||||
from agentpress.tool import Tool, ToolResult, openapi_schema, xml_schema
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import json
|
|||
|
||||
from agentpress.tool import ToolResult, openapi_schema, xml_schema
|
||||
from agentpress.thread_manager import ThreadManager
|
||||
from sandbox.sandbox import SandboxToolsBase, Sandbox
|
||||
from sandbox.sandbox import SandboxToolsBase
|
||||
from utils.logger import logger
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import os
|
||||
from dotenv import load_dotenv
|
||||
from agentpress.tool import ToolResult, openapi_schema, xml_schema
|
||||
from sandbox.sandbox import SandboxToolsBase, Sandbox
|
||||
from sandbox.sandbox import SandboxToolsBase
|
||||
from utils.files_utils import clean_path
|
||||
from agentpress.thread_manager import ThreadManager
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
from typing import Optional
|
||||
from agentpress.tool import ToolResult, openapi_schema, xml_schema
|
||||
from sandbox.sandbox import SandboxToolsBase, Sandbox
|
||||
from sandbox.sandbox import SandboxToolsBase
|
||||
from agentpress.thread_manager import ThreadManager
|
||||
|
||||
class SandboxExposeTool(SandboxToolsBase):
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
from daytona_sdk.process import SessionExecuteRequest
|
||||
from typing import Optional
|
||||
|
||||
from agentpress.tool import ToolResult, openapi_schema, xml_schema
|
||||
from sandbox.sandbox import SandboxToolsBase, Sandbox, get_or_start_sandbox
|
||||
from utils.files_utils import EXCLUDED_FILES, EXCLUDED_DIRS, EXCLUDED_EXT, should_exclude_file, clean_path
|
||||
from sandbox.sandbox import SandboxToolsBase
|
||||
from utils.files_utils import should_exclude_file, clean_path
|
||||
from agentpress.thread_manager import ThreadManager
|
||||
from utils.logger import logger
|
||||
import os
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Optional, Dict, List
|
||||
from typing import Optional, Dict
|
||||
from uuid import uuid4
|
||||
from agentpress.tool import ToolResult, openapi_schema, xml_schema
|
||||
from sandbox.sandbox import SandboxToolsBase, Sandbox
|
||||
from sandbox.sandbox import SandboxToolsBase
|
||||
from agentpress.thread_manager import ThreadManager
|
||||
|
||||
class SandboxShellTool(SandboxToolsBase):
|
||||
|
|
|
@ -4,7 +4,7 @@ import mimetypes
|
|||
from typing import Optional
|
||||
|
||||
from agentpress.tool import ToolResult, openapi_schema, xml_schema
|
||||
from sandbox.sandbox import SandboxToolsBase, Sandbox
|
||||
from sandbox.sandbox import SandboxToolsBase
|
||||
from agentpress.thread_manager import ThreadManager
|
||||
from utils.logger import logger
|
||||
import json
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
from tavily import AsyncTavilyClient
|
||||
import httpx
|
||||
from typing import List, Optional
|
||||
from datetime import datetime
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
from agentpress.tool import Tool, ToolResult, openapi_schema, xml_schema
|
||||
from utils.config import config
|
||||
|
|
|
@ -8,7 +8,7 @@ reaching the context window limitations of LLM models.
|
|||
import json
|
||||
from typing import List, Dict, Any, Optional
|
||||
|
||||
from litellm import token_counter, completion, completion_cost
|
||||
from litellm import token_counter, completion_cost
|
||||
from services.supabase import DBConnection
|
||||
from services.llm import make_llm_api_call
|
||||
from utils.logger import logger
|
||||
|
|
|
@ -16,7 +16,7 @@ from typing import List, Dict, Any, Optional, Tuple, AsyncGenerator, Callable, U
|
|||
from dataclasses import dataclass
|
||||
from datetime import datetime, timezone
|
||||
|
||||
from litellm import completion_cost, token_counter
|
||||
from litellm import completion_cost
|
||||
|
||||
from agentpress.tool import Tool, ToolResult
|
||||
from agentpress.tool_registry import ToolRegistry
|
||||
|
|
|
@ -7,7 +7,7 @@ This module defines the base classes and decorators for creating tools in AgentP
|
|||
- Result containers for standardized tool outputs
|
||||
"""
|
||||
|
||||
from typing import Dict, Any, Union, Optional, List, Type
|
||||
from typing import Dict, Any, Union, Optional, List
|
||||
from dataclasses import dataclass, field
|
||||
from abc import ABC
|
||||
import json
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from typing import Dict, Type, Any, List, Optional, Callable
|
||||
from agentpress.tool import Tool, SchemaType, ToolSchema
|
||||
from agentpress.tool import Tool, SchemaType
|
||||
from utils.logger import logger
|
||||
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import os
|
||||
from typing import List, Optional
|
||||
from typing import Optional
|
||||
|
||||
from fastapi import FastAPI, UploadFile, File, HTTPException, APIRouter, Form, Depends, Request
|
||||
from fastapi.responses import Response, JSONResponse
|
||||
from fastapi.responses import Response
|
||||
from pydantic import BaseModel
|
||||
|
||||
from utils.logger import logger
|
||||
from utils.auth_utils import get_current_user_id_from_jwt, get_user_id_from_stream_auth, get_optional_user_id
|
||||
from utils.auth_utils import get_optional_user_id
|
||||
from sandbox.sandbox import get_or_start_sandbox
|
||||
from services.supabase import DBConnection
|
||||
from agent.api import get_or_create_project_sandbox
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
from fastapi import FastAPI, APIRouter, HTTPException, Body
|
||||
from playwright.async_api import async_playwright, Browser, Page, ElementHandle
|
||||
from playwright.async_api import async_playwright, Browser, Page
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional, List, Dict, Any, Union
|
||||
from typing import Optional, List, Dict, Any
|
||||
import asyncio
|
||||
import json
|
||||
import logging
|
||||
import re
|
||||
import base64
|
||||
from dataclasses import dataclass, field
|
||||
from datetime import datetime
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import os
|
||||
from typing import Optional
|
||||
|
||||
from daytona_sdk import Daytona, DaytonaConfig, CreateSandboxParams, Sandbox, SessionExecuteRequest
|
||||
|
|
|
@ -5,14 +5,14 @@ stripe listen --forward-to localhost:8000/api/billing/webhook
|
|||
"""
|
||||
|
||||
from fastapi import APIRouter, HTTPException, Depends, Request
|
||||
from typing import Optional, Dict, Any, List, Tuple
|
||||
from typing import Optional, Dict, Tuple
|
||||
import stripe
|
||||
from datetime import datetime, timezone
|
||||
from utils.logger import logger
|
||||
from utils.config import config, EnvMode
|
||||
from services.supabase import DBConnection
|
||||
from utils.auth_utils import get_current_user_id_from_jwt
|
||||
from pydantic import BaseModel, Field
|
||||
from pydantic import BaseModel
|
||||
|
||||
# Initialize Stripe
|
||||
stripe.api_key = config.STRIPE_SECRET_KEY
|
||||
|
|
|
@ -18,8 +18,6 @@ from openai import OpenAIError
|
|||
import litellm
|
||||
from utils.logger import logger
|
||||
from utils.config import config
|
||||
from datetime import datetime
|
||||
import traceback
|
||||
|
||||
# litellm.set_verbose=True
|
||||
litellm.modify_params=True
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
Centralized database connection management for AgentPress using Supabase.
|
||||
"""
|
||||
|
||||
import os
|
||||
from typing import Optional
|
||||
from supabase import create_async_client, AsyncClient
|
||||
from utils.logger import logger
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
from fastapi import HTTPException, Request, Depends
|
||||
from typing import Optional, List, Dict, Any
|
||||
from fastapi import HTTPException, Request
|
||||
from typing import Optional
|
||||
import jwt
|
||||
from jwt.exceptions import PyJWTError
|
||||
from utils.logger import logger
|
||||
|
||||
# This function extracts the user ID from Supabase JWT
|
||||
async def get_current_user_id_from_jwt(request: Request) -> str:
|
||||
|
|
|
@ -13,7 +13,6 @@ import json
|
|||
import sys
|
||||
import os
|
||||
from datetime import datetime
|
||||
from typing import Any, Dict, Optional
|
||||
from contextvars import ContextVar
|
||||
from functools import wraps
|
||||
import traceback
|
||||
|
|
Loading…
Reference in New Issue