From 0729101eb2a6d8686f63229a83506480c5ef3fea Mon Sep 17 00:00:00 2001 From: beast-pro <116860578+beast-pro@users.noreply.github.com> Date: Sun, 17 Nov 2024 15:40:52 +0800 Subject: [PATCH] Fix: Resolve missing module import in FastAPI server The FastAPI server was failing to start due to `ModuleNotFoundError: No module named 'poe_api_wrapper.openai'` in `api.py`. This commit corrects the import path/installation issue to resolve the error. --- poe_api_wrapper/openai/api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poe_api_wrapper/openai/api.py b/poe_api_wrapper/openai/api.py index 185c0ad..38348a6 100644 --- a/poe_api_wrapper/openai/api.py +++ b/poe_api_wrapper/openai/api.py @@ -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 @@ -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}"]) \ No newline at end of file + CommandLineInterface().run(["poe_api_wrapper.openai.api:app", "--bind", f"{address}", "--port", f"{port}"])