Skip to content

Commit

Permalink
chore: Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
whiterabbit1983 committed Sep 19, 2024
1 parent 2831486 commit 87a8f6e
Show file tree
Hide file tree
Showing 44 changed files with 33 additions and 45 deletions.
1 change: 0 additions & 1 deletion agents-api/agents_api/clients/litellm.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
async def acompletion(
*, model: str, messages: list[dict], custom_api_key: None | str = None, **kwargs
) -> ModelResponse | CustomStreamWrapper:

supported_params = get_supported_openai_params(model)
settings = {k: v for k, v in kwargs.items() if k in supported_params}

Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/agents/create_agent.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends
from uuid import UUID
from starlette.status import HTTP_201_CREATED

import agents_api.models as models
Expand Down
1 change: 0 additions & 1 deletion agents-api/agents_api/routers/agents/create_agent_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from uuid import UUID

from fastapi import Depends
from uuid import UUID
from starlette.status import HTTP_201_CREATED

import agents_api.models as models
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from uuid import UUID

from fastapi import Depends
from uuid import UUID
from starlette.status import HTTP_201_CREATED

import agents_api.models as models
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/agents/delete_agent.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends
from uuid import UUID
from starlette.status import HTTP_202_ACCEPTED

from ...autogen.openapi_model import ResourceDeletedResponse
Expand Down
1 change: 0 additions & 1 deletion agents-api/agents_api/routers/agents/delete_agent_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from uuid import UUID

from fastapi import Depends
from uuid import UUID

from ...autogen.openapi_model import ResourceDeletedResponse
from ...dependencies.developer_id import get_developer_id
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/agents/get_agent_details.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends
from uuid import UUID

from ...autogen.openapi_model import Agent
from ...dependencies.developer_id import get_developer_id
Expand Down
1 change: 0 additions & 1 deletion agents-api/agents_api/routers/agents/list_agent_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from uuid import UUID

from fastapi import Depends
from uuid import UUID

from ...autogen.openapi_model import ListResponse, Tool
from ...dependencies.developer_id import get_developer_id
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/agents/list_agents.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import json
from json import JSONDecodeError
from typing import Annotated, Literal
from uuid import UUID

from fastapi import Depends, HTTPException, status
from uuid import UUID

from ...autogen.openapi_model import Agent, ListResponse
from ...dependencies.developer_id import get_developer_id
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/agents/patch_agent.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends
from uuid import UUID
from starlette.status import HTTP_200_OK

from ...autogen.openapi_model import PatchAgentRequest, ResourceUpdatedResponse
Expand Down
1 change: 0 additions & 1 deletion agents-api/agents_api/routers/agents/patch_agent_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from uuid import UUID

from fastapi import Depends
from uuid import UUID

from ...autogen.openapi_model import (
PatchToolRequest,
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/agents/update_agent.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends
from uuid import UUID
from starlette.status import HTTP_200_OK

from ...autogen.openapi_model import ResourceUpdatedResponse, UpdateAgentRequest
Expand Down
1 change: 0 additions & 1 deletion agents-api/agents_api/routers/agents/update_agent_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from uuid import UUID

from fastapi import Depends
from uuid import UUID

from ...autogen.openapi_model import (
ResourceUpdatedResponse,
Expand Down
1 change: 0 additions & 1 deletion agents-api/agents_api/routers/docs/create_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from uuid import UUID, uuid4

from fastapi import BackgroundTasks, Depends
from uuid import UUID
from starlette.status import HTTP_201_CREATED
from temporalio.client import Client as TemporalClient

Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/docs/delete_doc.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends
from uuid import UUID
from starlette.status import HTTP_202_ACCEPTED

from ...autogen.openapi_model import ResourceDeletedResponse
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/docs/get_doc.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends
from uuid import UUID

from ...autogen.openapi_model import Doc
from ...dependencies.developer_id import get_developer_id
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/docs/list_docs.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import json
from json import JSONDecodeError
from typing import Annotated, Literal
from uuid import UUID

from fastapi import Depends, HTTPException, status
from uuid import UUID

from ...autogen.openapi_model import Doc, ListResponse
from ...dependencies.developer_id import get_developer_id
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/docs/search_docs.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import time
from typing import Annotated, Any, Dict, List, Optional, Tuple, Union
from uuid import UUID

from fastapi import Depends
from uuid import UUID

from ...autogen.openapi_model import (
DocSearchResponse,
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/jobs/routers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Literal
from uuid import UUID

from fastapi import APIRouter
from uuid import UUID
from temporalio.client import WorkflowExecutionStatus

from agents_api.autogen.openapi_model import JobStatus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from uuid import UUID

from fastapi import Depends
from uuid import UUID
from starlette.status import HTTP_201_CREATED

from ...autogen.openapi_model import (
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/sessions/create_session.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends
from uuid import UUID
from starlette.status import HTTP_201_CREATED

from ...autogen.openapi_model import (
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/sessions/delete_session.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends
from uuid import UUID
from starlette.status import HTTP_202_ACCEPTED

from ...autogen.openapi_model import ResourceDeletedResponse
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/sessions/get_session.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends
from uuid import UUID

from ...autogen.openapi_model import Session
from ...dependencies.developer_id import get_developer_id
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends
from uuid import UUID

from ...autogen.openapi_model import History
from ...dependencies.developer_id import get_developer_id
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/sessions/list_sessions.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import json
from json import JSONDecodeError
from typing import Annotated, Literal
from uuid import UUID

from fastapi import Depends, HTTPException, status
from uuid import UUID

from ...autogen.openapi_model import ListResponse, Session
from ...dependencies.developer_id import get_developer_id
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/sessions/patch_session.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends
from uuid import UUID

from ...autogen.openapi_model import (
PatchSessionRequest,
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/sessions/update_session.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends
from uuid import UUID

from ...autogen.openapi_model import (
ResourceUpdatedResponse,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends, HTTPException
from jsonschema import validate
from jsonschema.exceptions import SchemaError, ValidationError
from uuid import UUID
from starlette.status import HTTP_201_CREATED

from agents_api.autogen.openapi_model import (
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/tasks/create_task.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends, HTTPException
from jsonschema import validate
from jsonschema.exceptions import SchemaError, ValidationError
from uuid import UUID
from starlette.status import HTTP_201_CREATED

from ...autogen.openapi_model import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from jsonschema import validate
from jsonschema.exceptions import ValidationError
from pycozo.client import QueryException
from uuid import UUID
from starlette.status import HTTP_201_CREATED
from temporalio.client import WorkflowHandle

Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/tasks/get_task_details.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends, HTTPException, status
from pycozo.client import QueryException
from uuid import UUID

from ...autogen.openapi_model import (
Task,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from typing import Literal

from uuid import UUID

from agents_api.autogen.openapi_model import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Annotated, Literal
from uuid import UUID

from fastapi import Depends
from uuid import UUID

from agents_api.autogen.openapi_model import (
Execution,
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/tasks/list_tasks.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Annotated, Literal
from uuid import UUID

from fastapi import Depends
from uuid import UUID

from agents_api.autogen.openapi_model import (
ListResponse,
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/tasks/patch_execution.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends
from uuid import UUID

from agents_api.autogen.openapi_model import (
ResourceUpdatedResponse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
from base64 import b64decode, b64encode
from functools import partial
from typing import Annotated
from uuid import UUID

import anyio
from anyio.streams.memory import MemoryObjectSendStream
from fastapi import Depends, Query
from uuid import UUID
from sse_starlette.sse import EventSourceResponse
from starlette.requests import Request
from temporalio.api.enums.v1 import EventType
Expand Down
3 changes: 1 addition & 2 deletions agents-api/agents_api/routers/tasks/update_execution.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends, HTTPException
from uuid import UUID

from agents_api.autogen.openapi_model import (
ResumeExecutionRequest,
Expand Down Expand Up @@ -35,7 +35,6 @@ async def update_execution(
await wf_handle.cancel()

case ResumeExecutionRequest():

token_data = get_paused_execution_token(
developer_id=x_developer_id, execution_id=execution_id
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends
from uuid import UUID
from starlette.status import HTTP_201_CREATED

from ...autogen.openapi_model import CreateOrUpdateUserRequest, ResourceCreatedResponse
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/users/create_user.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends
from uuid import UUID
from starlette.status import HTTP_201_CREATED

from ...autogen.openapi_model import CreateUserRequest, ResourceCreatedResponse
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/users/delete_user.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends
from uuid import UUID
from starlette.status import HTTP_202_ACCEPTED

from ...autogen.openapi_model import ResourceDeletedResponse
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/users/get_user_details.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends
from uuid import UUID

from ...autogen.openapi_model import User
from ...dependencies.developer_id import get_developer_id
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/users/list_users.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import json
from json import JSONDecodeError
from typing import Annotated, Literal
from uuid import UUID

from fastapi import Depends, HTTPException, status
from uuid import UUID

from ...autogen.openapi_model import ListResponse, User
from ...dependencies.developer_id import get_developer_id
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/users/patch_user.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Annotated
from uuid import UUID

from fastapi import Depends
from uuid import UUID

from ...autogen.openapi_model import PatchUserRequest, ResourceUpdatedResponse
from ...dependencies.developer_id import get_developer_id
Expand Down
Loading

0 comments on commit 87a8f6e

Please sign in to comment.