Closed tschesnok closed 9 months ago
It seems one needs to replace beta with plus in all the URLs to get it to work with a plus membership.
data is {"abort": true, "error": "500 Internal Server Error" }. Can we solve this problem by subscribing to the membership?
I'm not sure. I just know I have it working today. So the code still works. In my case I'm paying for plus and changed all URLs in the code to "plus". You should always run a browser at the same time and see what the browser version says. There could always be performance related timeouts on their part, right?
Try again on v0.6.0
@kramcat where i can get pyCAI('TOKEN')?
@Fadlay Read the readme first, go into the docs and check (https://pycai.gitbook.io/welcome/api/values)
@KubaPro010 oke thankss bro
"Try again on v0.6.0"
Well.. that does not fix the API for plus accounts. Code is the old code with "Beta" in the title. Perhaps I'm missing something... but I would think that many people playing with the API are probably "plus" account holders.
Added plus in v0.7.0
fixed on v0.8.0
I'm able to retrieve my account information via client.user.info() so the token is correct! (this is good :) But then any send_message call ends up in a timeout. I'm a "+" user so there should be no access issues. Works fine in a browser at the same time. xxx = obvious obfuscation. I can't get telegram to work..
Here is my code:
from characterai import pyCAI client = pyCAI('9xxxxxxxxxxxxxxxxx4') print (client.user.info() )
while True: message = input('You: ') data = client.chat.send_message('ixxxxxxxxxxxxxxxxM', message, wait=True) print(f"{data['src_char']['participant']['name']}: {data['replies'][0]['text']}")