Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
davorrunje committed Jul 31, 2024
1 parent 7b1982e commit ea945e9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fastagency/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from pydantic import BaseModel, TypeAdapter, ValidationError

from .auth_token.auth import DeploymentAuthToken, create_deployment_auth_token
from .db.base import BackendDBProtocol, FrontendDBProtocol
from .db.base import BackendDBProtocol, DefaultDB, FrontendDBProtocol
from .db.prisma import PrismaBackendDB, PrismaFrontendDB
from .helpers import (
add_model_to_user,
Expand Down
2 changes: 1 addition & 1 deletion fastagency/auth_token/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from fastapi import HTTPException
from pydantic import BaseModel

from ..db.base import BackendDBProtocol, FrontendDBProtocol
from ..db.base import BackendDBProtocol, DefaultDB, FrontendDBProtocol


def generate_auth_token(length: int = 32) -> str:
Expand Down
5 changes: 5 additions & 0 deletions fastagency/db/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
runtime_checkable,
)

class KeyNotFound(ValueError):
pass

class KeyExists(ValueError):
pass

@runtime_checkable
class BackendDBProtocol(Protocol):
Expand Down
2 changes: 1 addition & 1 deletion fastagency/models/agents/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from fastagency.openapi.client import Client

from ...db.base import BackendDBProtocol
from ...db.base import BackendDBProtocol, DefaultDB
from ..base import Model
from ..registry import Registry
from ..toolboxes.toolbox import ToolboxRef
Expand Down
2 changes: 1 addition & 1 deletion fastagency/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pydantic import BaseModel, Field, create_model, model_validator
from typing_extensions import TypeAlias

from ..db.base import BackendDBProtocol
from ..db.base import BackendDBProtocol, DefaultDB

M = TypeVar("M", bound="Model")

Expand Down

0 comments on commit ea945e9

Please sign in to comment.