Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Resolve missing module import in FastAPI server #208

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions poe_api_wrapper/openai/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from daphne.cli import CommandLineInterface
from typing import Any, Dict, Tuple, Union, AsyncGenerator
from poe_api_wrapper import AsyncPoeApi
from poe_api_wrapper.openai import helpers
from poe_api_wrapper.openai.type import *
import helpers
from type import *
import orjson, asyncio, random, os, uuid
from httpx import AsyncClient

Expand Down Expand Up @@ -469,4 +469,4 @@ def start_server(tokens: list, address: str="127.0.0.1", port: str="8000"):
if not all(isinstance(token, dict) for token in tokens):
raise TypeError("Tokens must be a list of dictionaries.")
app.state.tokens = tokens
CommandLineInterface().run(["poe_api_wrapper.openai.api:app", "--bind", f"{address}", "--port", f"{port}"])
CommandLineInterface().run(["poe_api_wrapper.openai.api:app", "--bind", f"{address}", "--port", f"{port}"])