kramcat / CharacterAI

Unofficial Python API for character.ai
https://docs.kram.cat
MIT License
378 stars 51 forks source link

What does "KeyError: 'src_char'" mean? #32

Closed Bahman-sudo closed 11 months ago

Bahman-sudo commented 12 months ago

So, I wanted to see if this would be a means to bypass the filter on character.ai, But, when I did do that, occasionally, I would get name = data['src_char']['participant']['name'] KeyError: 'src_char'

What does this mean?

KubaPro010 commented 12 months ago

The filter is on the server-side, and so the server instead of the normal message returns a message that doesn't have anything that you could expect (like 'src_char'), you can't bypass the filter (the response would look like this: "{"abort": true, "error": "No eligible candidates", "last_user_msg_id": ..., "last_user_msg_uuid": "..."}")

Bahman-sudo commented 12 months ago

Oh, thanks