|
13 | 13 | from contextlib import asynccontextmanager |
14 | 14 | from functools import partial |
15 | 15 | from http import HTTPStatus |
16 | | -from typing import AsyncIterator, Optional, Set, Tuple, Dict, Union |
| 16 | +from typing import AsyncIterator, Dict, Optional, Set, Tuple, Union |
17 | 17 |
|
18 | 18 | import uvloop |
19 | 19 | from fastapi import APIRouter, FastAPI, HTTPException, Request |
@@ -419,7 +419,7 @@ async def create_embedding(request: EmbeddingRequest, raw_request: Request): |
419 | 419 | "use the Pooling API (`/pooling`) instead.") |
420 | 420 |
|
421 | 421 | res = await fallback_handler.create_pooling(request, raw_request) |
422 | | - |
| 422 | + |
423 | 423 | generator: Union[ErrorResponse, EmbeddingResponse] |
424 | 424 | if isinstance(res, PoolingResponse): |
425 | 425 | generator = EmbeddingResponse( |
@@ -495,7 +495,7 @@ async def create_score_v1(request: ScoreRequest, raw_request: Request): |
495 | 495 | return await create_score(request, raw_request) |
496 | 496 |
|
497 | 497 |
|
498 | | -TASK_HANDLERS: Dict[str, Dict[str,tuple]] = { |
| 498 | +TASK_HANDLERS: Dict[str, Dict[str, tuple]] = { |
499 | 499 | "generate": { |
500 | 500 | "messages": (ChatCompletionRequest, create_chat_completion), |
501 | 501 | "default": (CompletionRequest, create_completion), |
|
0 commit comments