poe-platform / server-bot-quick-start

Tutorial for Poe server bots
1.3k stars 190 forks source link

Response Returned by poe api is less than web #69

Open tuanv2t opened 8 months ago

tuanv2t commented 8 months ago

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

anmolsingh95 commented 7 months ago

Thanks for the report @tuanv2t . We are investigating this and will let you know as soon as we understand this more.

tuanv2t commented 7 months ago

Thank you @anmolsingh95 , fixing this issue can make poe api more power

tuanv2t commented 7 months ago

hi @anmolsingh95 , do you have any idea.

anmolsingh95 commented 7 months ago

Hi @tuanv2t, we have identified the issue and are still working on a resolution. I can share as soon as we have an update.

anmolsingh95 commented 6 months ago

@tuanv2t, can you give this a shot now?

tuanv2t commented 6 months ago

Hi @anmolsingh95 , My Bot is still working at https://poe.com/BotNhaThuocLongChau2 But I already paused my subscription then I can see the result when using python api in the previous image.

The content is in Vietnamese You can try this question: "Có bán Vitamin B không"

Run on web Then run on the api ( when you debug ) and compare two results ( as my original post )