|
7 | 7 | from sqlalchemy.ext.asyncio import AsyncSession |
8 | 8 |
|
9 | 9 | from api.dependencies import create_provider_use_case_factory, delete_provider_use_case_factory, get_request_context |
10 | | -from api.domain.model import InconsistentModelMaxContextLengthError, InconsistentModelVectorSizeError |
| 10 | +from api.domain.model.errors import InconsistentModelMaxContextLengthError, InconsistentModelVectorSizeError |
11 | 11 | from api.domain.provider import InvalidProviderTypeError, ProviderNotReachableError |
12 | 12 | from api.domain.provider.errors import ProviderAlreadyExistsError, ProviderNotFoundError |
13 | 13 | from api.domain.router.errors import RouterNotFoundError |
|
47 | 47 | path=EndpointRoute.ADMIN_PROVIDERS, |
48 | 48 | dependencies=[Security(dependency=get_current_key)], |
49 | 49 | status_code=201, |
50 | | - responses=get_documentation_responses( |
51 | | - [ |
52 | | - InconsistentModelMaxContextLengthHTTPException, |
53 | | - InconsistentModelVectorSizeHTTPException, |
54 | | - InvalidProviderTypeHTTPException, |
55 | | - ProviderNotReachableHTTPException, |
56 | | - ProviderAlreadyExistsHTTPException, |
57 | | - RouterNotFoundHTTPException, |
58 | | - NotAdminUserHTTPException, |
59 | | - ] |
60 | | - ), |
| 50 | + responses=get_documentation_responses([ |
| 51 | + InconsistentModelMaxContextLengthHTTPException, |
| 52 | + InconsistentModelVectorSizeHTTPException, |
| 53 | + InvalidProviderTypeHTTPException, |
| 54 | + ProviderNotReachableHTTPException, |
| 55 | + ProviderAlreadyExistsHTTPException, |
| 56 | + RouterNotFoundHTTPException, |
| 57 | + NotAdminUserHTTPException, |
| 58 | + ]), |
61 | 59 | ) |
62 | 60 | async def create_provider( |
63 | 61 | request: Request, |
|
0 commit comments