Spaces:
Runtime error
Runtime error
#import requests | |
import os | |
import asyncio | |
from pygpt import PyGPT | |
session_token = os.environ.get('SessionToken') | |
#conversation_id = os.environ.get('conversation_id') | |
async def main(): | |
chat_gpt = PyGPT('eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0..gTz2d7cx1hwglfBr.QpbVoYL9nXFW2P-Rf1OTv_6kig7Mt55ub1qI1a5snnLqWlZjFWLWlIvdHqZCkhosloLxteXwQXMSMBJU1abD1vfv1ajl6VIR5zCcR9LwBbz1zCSzhN114y1t42ec-pF5_VpsU3jssNDgjaCoaoB4QN3dkiwZ7Uq-Ge2ZYk5RhgP4ruhnXhhKF5I1w__mTsQPME3WIO4-4k1csJrB3KU_smntlPSp5IlUZ_6h0jv7lRItNblWVSdYvQ5DyYsfifbQF0GrvQlqEyWd79fU9rrv3Y7NvdYCKP5iPifr4cP7RfyI7Sg7MB2BNuYkysgT8m3XHZcVLiYr85-TcgdHcThRMx4vfb4ogEn3Jfh2TLFZbH1zmJur16JjTlWDXqZ0qjBnUqP3G9LifTLaxSNLCErC2HzgX89c3BP0mf6FIZSzkq_S_r4vblM13dfofo0VTJIufmZ5x3z8U40Va4VnLPdWcn_qLs9OnlNagcbCkvTYWyuyPSuncxhd9rc4T5n_GO6MZO21xIgT5LtNIjnSwS6dzi2hZruirmocj_DpFRARvEQeTU4C6XiZfuuye-UjmEOMVxkHiu3IybEBAVL2Odi9wLYuU3CJbZFBJ3EzAQY_q0PgVRueY1l5wtTAjSNMFJaC6nZmYiFeS29gXYJrmSzKp7xYlEDbPoh32MY0T27oZ9JeD-cN_fkieEomkR5Hxfyebe4AhbngwPQs0aN_gG-fqf_bXiV-B7XuZ4Zzk7ZA1I3a2VJyiPtqIfilbqCn_IQYwmet0DJPW4tcPreYgkCRDYOYczcHv0ojIwEybLwC_DXSEcywQt52diGRTElMZtWlKV8fbgTyOztvEj9k2Wl3BhkG-pWaK7_5JrE1_3PzKesG_a89Y-xfawJ1MGzyHHlj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F1sgEubSOp97LuEm_8Ds_-AQhgHobEN87R-gUMJ_jg491s7SGFwwoAgFo65G5TQLjArfDdhPr_f3pTQqJ4EGQgUfDh_W3x2vlYpOnIpIJ21rZC0gyOrm9P-AJQEmU5zCW4vHlSAee4rsS8f3GAHL_D5Cu0gFFqPcBwX-gUaZ0nPb6fCrYbNqH4t6vvVavnphe5TA89pBYvdxrlZ-K4U14cz4p2dyhwZ1U8m8ktCdN89poBpjPdh4lnndNX5SnsjKD1XvMsjpvmmzXPJmhFm-k82luP6ibrnOo58fnrhDHpPH2Jbhkojkup0D9NMEq9njgSc5_0ifASmJ70Ay5yKdrRcVA3JMZ6lMceUj_HZMv2XcJZHwpbIM0TdBLC-CMwdUlGdbUxLOaoahsZAcR_1pbfibr1eI0o8Pt9bBKjxxPD1x9hKpuOLTPqHkf5tYebM5JWtfDN2i7Lqv1ggjW4u1Ek7ScNX3ZrOKX_8rma5KPcVlp-kbPzDo31fYRWt2MECCZbichXXeOwlVC8XfewhFEis23H3rMjiwU0OFfkm68Vlb9RaKNnEk56dKrKB-vBWilwLr0y_7gJJN3Dvfv2F4sUV56EZ09mL9C8znKN1LEMLUwHBgTaMLRORAu2sE6ZlGbtfmKCOtyOSumF15S3wFp2lgDYY8hq6jRL1ODjlvqUayCkJpSlunavfn9q.G5GW3zjSYpPybpOb48RS0Q', | |
bypass_node='https://gpt.pawan.krd:5000') | |
await chat_gpt.connect() | |
await chat_gpt.wait_for_ready() | |
answer = await chat_gpt.ask('What is the capital of France?') | |
print(answer) | |
await chat_gpt.disconnect() | |
if __name__ == '__main__': | |
#import requests | |
#from requests.packages import urllib3 | |
#urllib3.disable_warnings() | |
#req = requests.get('https://gpt.pawan.krd/',verify=False) | |
#print(req.text) | |
asyncio.run(main()) | |