Spaces:
Paused
Paused
:recycle: [Refactor] Remove unused imports
Browse files
apis/chat_api.py
CHANGED
@@ -1,14 +1,12 @@
|
|
1 |
import uvicorn
|
2 |
-
|
3 |
from fastapi import FastAPI
|
4 |
from pydantic import BaseModel, Field
|
|
|
5 |
from conversations import (
|
6 |
ConversationConnector,
|
7 |
ConversationCreator,
|
8 |
ConversationSession,
|
9 |
)
|
10 |
-
from networks import OpenaiStreamOutputer
|
11 |
-
from sse_starlette.sse import EventSourceResponse
|
12 |
|
13 |
|
14 |
class ChatAPIApp:
|
|
|
1 |
import uvicorn
|
|
|
2 |
from fastapi import FastAPI
|
3 |
from pydantic import BaseModel, Field
|
4 |
+
from sse_starlette.sse import EventSourceResponse
|
5 |
from conversations import (
|
6 |
ConversationConnector,
|
7 |
ConversationCreator,
|
8 |
ConversationSession,
|
9 |
)
|
|
|
|
|
10 |
|
11 |
|
12 |
class ChatAPIApp:
|
conversations/conversation_connector.py
CHANGED
@@ -1,14 +1,13 @@
|
|
1 |
import aiohttp
|
2 |
-
import asyncio
|
3 |
-
import httpx
|
4 |
import json
|
5 |
import urllib
|
6 |
|
7 |
from networks import (
|
8 |
ChathubRequestPayloadConstructor,
|
9 |
ConversationRequestHeadersConstructor,
|
|
|
|
|
10 |
)
|
11 |
-
from networks import MessageParser, OpenaiStreamOutputer
|
12 |
from utils.logger import logger
|
13 |
|
14 |
http_proxy = "http://localhost:11111" # Replace with yours
|
|
|
1 |
import aiohttp
|
|
|
|
|
2 |
import json
|
3 |
import urllib
|
4 |
|
5 |
from networks import (
|
6 |
ChathubRequestPayloadConstructor,
|
7 |
ConversationRequestHeadersConstructor,
|
8 |
+
MessageParser,
|
9 |
+
OpenaiStreamOutputer,
|
10 |
)
|
|
|
11 |
from utils.logger import logger
|
12 |
|
13 |
http_proxy = "http://localhost:11111" # Replace with yours
|