Skip to content

Response Returned by poe api is less than web #69

@tuanv2t

Description

@tuanv2t

I create a bot https://poe.com/BotNhaThuocLongChau2
Then I upload some pdf files to my bot.
And also purchased a subscription to get API key
Then I tried to query from python code with the question "Có bán Vitamin B không" to compare response between web and api

For web I received the good response:
poe web - co ban vitamin b khong

Then I tried in the python code

poe- api - less response

I compared the response and surprised that the web returned much more information than API.
I don't know if I miss something in my code .

It's ok to share my python api code here


import asyncio
import fastapi_poe as fp


async def get_responses(api_key, messages):
    global last_reply
    last_reply=""
    async for partial in fp.get_bot_response(messages=messages, bot_name="BotNhaThuocLongChau2", api_key="[my_api_key]",temperature=0.0):

        last_reply += partial.text

api_key = "[my_api_key]"
message = fp.ProtocolMessage(role="user", content="Có bán Vitamin B không")

asyncio.run(get_responses("[my_api_key]", [message]))


print(last_reply)

Please advise

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions