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

Specifying a bot in a parameter has no effect #170

Open
xzwthu opened this issue Jun 23, 2024 · 11 comments
Open

Specifying a bot in a parameter has no effect #170

xzwthu opened this issue Jun 23, 2024 · 11 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@xzwthu
Copy link

xzwthu commented Jun 23, 2024

I updated the version to 1.5.7, then sent a message and it replied it's gpt 4.0, later I verified that it seemed like it was always replying the same no matter what Bot I specified. In fact, this is already the case in the earlier version, I made sure tonight that specifying the bot in the parameters does not work. But I don't know what caused it.

from poe_api_wrapper import AsyncPoeApi
import asyncio
tokens = {
    'p-b': 'j9ZnssKP-_Vc6EZ1LfI9Zg%3D%3D',
    'p-lat': "OF9LWK8117Se5KRpwzCaKwcsS%2FrG%2FhtXhJNg%2F6xvQA%3D%3D"
}

async def main():
    client = await AsyncPoeApi(tokens=tokens).create()
    message = "which model are you?"
    async for chunk in client.send_message(bot="gpt3_5", message=message):
        print(chunk["response"], end='', flush=True)

asyncio.run(main())

This is a big problem for me, because sometimes I want some images to generate, but this is completely unusable in the original version

微信截图_20240623224643

@snowby666
Copy link
Owner

snowby666 commented Jun 23, 2024

^^ Can you try deleting cookies then login poe.com again?

@xzwthu
Copy link
Author

xzwthu commented Jun 23, 2024

^^ Can you try deleting cookies then login poe.com again?

Ah, thanks for the warning. I've done that --deleting cookies then login poe.com again, so there won't be a leak, but now the problem is still there, not solved

@snowby666
Copy link
Owner

snowby666 commented Jun 23, 2024

Does this bug only happen with the above token?

Can you try this token

"p-b": "EpIGqnEPatvs0FQ%3D%3D",
"p-lat": "2McXqSR8yaylC9ONZewBBh3oV5HIIADarNQ%3D%3D"

@snowby666 snowby666 added the bug Something isn't working label Jun 23, 2024
@xzwthu
Copy link
Author

xzwthu commented Jun 23, 2024

2McXqSR8yaylC9ONZewBBh5MVN9Ew3oV5HIIADarNQ%3D%3D

The error remains when I try the token above. You can check the chat history in the accout.

@snowby666
Copy link
Owner

I've seen my chat history and now i can't revert back to any model than gpt-4. It may a problem with the headers or some post request after sending message. Can you test with new account in versions 1.4.x to see if it returns correct model?

@snowby666
Copy link
Owner

This is my ws_data when receiving response from bot. Its kinda strange when the author is still gpt3_5 not gpt-4.

image

@snowby666 snowby666 added the help wanted Extra attention is needed label Jun 24, 2024
@snowby666
Copy link
Owner

For my other tokens, they're working normally

@snowby666
Copy link
Owner

Can you provide me your headers when making request on poe.com for testing?

@xzwthu
Copy link
Author

xzwthu commented Jun 24, 2024

Can you provide me your headers when making request on poe.com for testing?

I just use the wrapper so I have no idea how to check my headers when I send. What should I do?

@snowby666
Copy link
Owner

You can go to poe.com. Open DevTools > Network > Send a message > Look for gql_POST > check its headers

@xzwthu
Copy link
Author

xzwthu commented Jun 25, 2024

You can go to poe.com. Open DevTools > Network > Send a message > Look for gql_POST > check its headers

Here is the headers:

:authority:
poe.com
:method:
POST
:path:
/api/gql_POST
:scheme:
https
Accept:
*/*
Accept-Encoding:
gzip, deflate, br, zstd
Accept-Language:
zh-CN,zh;q=0.9
Content-Length:
200
Content-Type:
application/json
Cookie:
p-b=4TOdvEEvK6t4PpTktJo8Ng%3D%3D; _fbp=fb.1.1719185101769.461448079441337023; _gcl_au=1.1.1019039189.1719185102.1199219635.1719185109.1719185159; p-lat=L0bxpctkvGvk%2B8FxG0YUSPqSpoF9Sz2AaUPHl6zqzg%3D%3D; __cf_bm=f8_joXIFqUSVVc9kiUVAWAcPjFclVu3PawvGF7GdObw-1719280935-1.0.1.1-j6Ds5aLBthKEPauNqMQjChrO7bCaoWGdugQoTqTC3o41gkD9Mj1dBzCcRnl3TfVX5.xhvyFfIN1PQ5p_RDOJjQ; cf_clearance=jwgaEIpbE8KP3Errpin3O3Z246s3cIN1.H6805Ix5lo-1719280936-1.0.1.1-YBBMta_ISzVyiWZiZxBvaQIBsYAPgQTOSv1_NtrxHyW33ZVfifx0jhZ5i5jxCM_tO75u_aigZA8qL6FY0VoDiw; OptanonConsent=isGpcEnabled=0&datestamp=Tue+Jun+25+2024+10%3A02%3A16+GMT%2B0800+(%E4%B8%AD%E5%9B%BD%E6%A0%87%E5%87%86%E6%97%B6%E9%97%B4)&version=202405.1.0&browserGpcFlag=0&isIABGlobal=false&hosts=&landingPath=NotLandingPage&groups=C0001%3A1%2CC0003%3A1%2CC0004%3A1&AwaitingReconsent=false; OptanonAlertBoxClosed=2024-06-25T02:02:16.785Z
Origin:
https://poe.com
Poe-Formkey:
b16a4f105006a799ce57977a5e69ed00
Poe-Queryname:
regenerateMessageMutation
Poe-Tag-Id:
d23219c99cfa2349a4af4cdd0388209c
Poe-Tchannel:
poe-chan69-8888-kiuktwlnjwfobatqqdnq
Priority:
u=1, i
Referer:
https://poe.com/chat/3dt7prx914fey7z2vp8
Sec-Ch-Ua:
"Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"
Sec-Ch-Ua-Mobile:
?0
Sec-Ch-Ua-Platform:
"Windows"
Sec-Fetch-Dest:
empty
Sec-Fetch-Mode:
cors
Sec-Fetch-Site:
same-origin
User-Agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants