Skip to content

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

@liku-amare

Description

@liku-amare

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions