web_poe_api
some useful api from poe.com
import os
from web_poe_api import use_bot,refresh_bot,create_bot
import json
import re
################################################
Path = os.path.dirname(os.path.abspath(__file__))
cookie = 'p-b=cktSb3s2AtYuPthsaZURfQ%3D%3D'
poe_formkey = '130f5fe51cb31eeeb056890004a17a89'
poe_tchannel = 'poe-chan53-8888-ejnafarqnmuzwuvbncmf'
#封包原函数,方便使用
def create_mybot(nickname,prompt,model):
return create_bot(nickname=nickname,prompt=prompt,model=model,dict_path=rf'{Path}\bot_dict.json',cookie=cookie,poe_formkey=poe_formkey,poe_tchannel=poe_tchannel)
def use_mybot(query,bot):
with open(rf'{Path}\bot_dict.json', 'r') as f:
bot_dict = json.load(f)
return use_bot(query,bot,bot_dict=bot_dict,cookie=cookie,poe_formkey=poe_formkey,poe_tchannel=poe_tchannel)
def refresh_mybot(nickname):
with open(rf'{Path}\bot_dict.json', 'r') as f:
bot_dict = json.load(f)
refresh_bot(nickname,bot_dict,cookie,poe_formkey=poe_formkey,poe_tchannel=poe_tchannel)
################################################
# 创建bot,参数依次为nickname,预设prompt,模型(gpt3_5或者claude)
# create_mybot("xhssss","省略一下~~~",'gpt3_5')
# 参数为nickname
# refresh_mybot('xhssss')
# 参数为问题query,nickname询问对象
last_answer,chat_suggest,chat_list_text,chat_list_raw = use_mybot(query="你是谁",bot='xhssss')
print(last_answer)
print(*chat_suggest)
Metadata
Release files for web-poe-api 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| web_poe_api-1.0.0.tar.gz | 6.2 kB | Without provenance | Details for web_poe_api-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| web_poe_api-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for web_poe_api-1.0.0-py3-none-any.whl |
Total release size: 12.6 kB
Release files / web_poe_api-1.0.0.tar.gz
| Download URL | web_poe_api-1.0.0.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0eb20b5c2e9fed8220605f90b5a531409df744b675479161a2aa2464b10115f2
|
|
BLAKE2b-256 checksum How to use checksums |
97c77219290436b04373f9e40225b7867713f307af0bf23b631d1690c2345fc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / web_poe_api-1.0.0-py3-none-any.whl
| Download URL | web_poe_api-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f398f9cae38d8bd3c4475c1e494384192c0767a2bd40679a3e772cb7c9b6d9d2
|
|
BLAKE2b-256 checksum How to use checksums |
e03019f2c413ae1841aa8810bc1d6454f1b0eed08165d295c5c477de30293ac8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Security for web-poe-api 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.