Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

🗑️ Remove unused __init__ #742

Merged
merged 4 commits into from
Jun 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions platform/reworkd_platform/db/crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ async def validate_task_count(self, run_id: str, type_: str) -> None:


class UserCrud(BaseCrud):
def __init__(self, session: AsyncSession):
super().__init__(session)

async def get_user_session(self, token: str) -> UserSession:
query = (
select(UserSession)
Expand Down
4 changes: 0 additions & 4 deletions platform/reworkd_platform/web/api/agent/tools/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from lanarky.responses import StreamingResponse
from langchain import LLMChain

from reworkd_platform.schemas import ModelSettings
from reworkd_platform.web.api.agent.model_settings import create_model
from reworkd_platform.web.api.agent.tools.tool import Tool

Expand All @@ -14,9 +13,6 @@ class Code(Tool):
)
public_description = "Write and review code."

def __init__(self, model_settings: ModelSettings):
super().__init__(model_settings)

async def call(
self, goal: str, task: str, input_str: str
) -> FastAPIStreamingResponse:
Expand Down
4 changes: 0 additions & 4 deletions platform/reworkd_platform/web/api/agent/tools/conclude.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
from fastapi.responses import StreamingResponse as FastAPIStreamingResponse

from reworkd_platform.schemas import ModelSettings
from reworkd_platform.web.api.agent.tools.stream_mock import stream_string
from reworkd_platform.web.api.agent.tools.tool import Tool


class Conclude(Tool):
description = "Use when there is nothing else to do. The task has been concluded."

def __init__(self, model_settings: ModelSettings):
super().__init__(model_settings)

async def call(
self, goal: str, task: str, input_str: str
) -> FastAPIStreamingResponse:
Expand Down
4 changes: 0 additions & 4 deletions platform/reworkd_platform/web/api/agent/tools/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from replicate.exceptions import ModelError
from replicate.exceptions import ReplicateError as ReplicateAPIError

from reworkd_platform.schemas import ModelSettings
from reworkd_platform.settings import settings
from reworkd_platform.web.api.agent.api_utils import rotate_keys
from reworkd_platform.web.api.agent.tools.stream_mock import stream_string
Expand Down Expand Up @@ -58,9 +57,6 @@ class Image(Tool):
)
public_description = "Generate AI images."

def __init__(self, model_settings: ModelSettings):
super().__init__(model_settings)

async def call(
self, goal: str, task: str, input_str: str
) -> FastAPIStreamingResponse:
Expand Down
4 changes: 0 additions & 4 deletions platform/reworkd_platform/web/api/agent/tools/reason.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from lanarky.responses import StreamingResponse
from langchain import LLMChain

from reworkd_platform.schemas import ModelSettings
from reworkd_platform.web.api.agent.model_settings import create_model
from reworkd_platform.web.api.agent.tools.tool import Tool

Expand All @@ -13,9 +12,6 @@ class Reason(Tool):
"Make decisions / selections from options."
)

def __init__(self, model_settings: ModelSettings):
super().__init__(model_settings)

async def call(
self, goal: str, task: str, input_str: str
) -> FastAPIStreamingResponse:
Expand Down
3 changes: 0 additions & 3 deletions platform/reworkd_platform/web/api/agent/tools/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ class Search(Tool):
)
public_description = "Search google for information about current events."

def __init__(self, model_settings: ModelSettings):
super().__init__(model_settings)

@staticmethod
def available() -> bool:
return settings.serp_api_key is not None and settings.serp_api_key != ""
Expand Down