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

GPT-3.5-Turbo dependency not working when using the API #111

Open
liku-amare opened this issue Jun 19, 2024 · 1 comment
Open

GPT-3.5-Turbo dependency not working when using the API #111

liku-amare opened this issue Jun 19, 2024 · 1 comment

Comments

@liku-amare
Copy link

liku-amare commented Jun 19, 2024

I have created a bot with GPT-3.5-Turbo dependency using the code provided here. It works well on the web (poe.com). But I wanted to call my bot through this library and tried with the following code (from here). But it keeps giving the fastapi_poe.client.BotError: {"allow_retry": true, "text": "Internal server error"} error.

import asyncio
import fastapi_poe as fp

async def get_responses(api_key, bot_name, messages):
    async for partial in fp.get_bot_response(messages=messages, bot_name=bot_name, api_key=api_key):
        print(partial)

api_key = "..."

message = fp.ProtocolMessage(role="user", content="Hello world")

bot_name = "My_Bot_Name_Here"

asyncio.run(get_responses(api_key, bot_name, [message]))

The error on my VS Code is:

Error in Poe bot: Bot request to My_Bot_Name_Here failed on try 0 
 BotError('{"allow_retry": true, "text": "Internal server error"}')
Error in Poe bot: Bot request to My_Bot_Name_Here failed on try 1 
 BotError('{"allow_retry": true, "text": "Internal server error"}')

The error on the Modal console is:

Error in Poe bot: Bot request to GPT-3.5-Turbo failed on try 0 
 BotError('{"allow_retry": true, "text": "Internal server error"}')
Error in Poe bot: Bot request to GPT-3.5-Turbo failed on try 1 
 BotError('{"allow_retry": true, "text": "Internal server error"}')

It seems the GPT-3.5-Turbo dependency is working just fine on the web interface, but not working when using the API. Why is that?

@liku-amare liku-amare changed the title Acessing my own bots through the fastapi_poe library GPT-3.5-Turbo dependency not working when using the API Jun 19, 2024
@JohntheLi
Copy link
Collaborator

Hi @liku-amare , apologies for the super late response. From your code, I do not see

async def get_settings(self, setting: fp.SettingsRequest) -> fp.SettingsResponse:
    return fp.SettingsResponse(server_bot_dependencies={"GPT-3.5-Turbo": 1})

defined anywhere. Do you have this defined in your PoeBot code? see https://creator.poe.com/docs/server-bots-functional-guides#accessing-other-bots-on-poe for details. If you still see issues, please provide the error_id and I can help take a look at the stack trace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants