kramcat / CharacterAI

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

PyCAI.chat.send_message() missing 1 required positional argument: 'history_id' #95

Open Pavex53 opened 3 months ago

Pavex53 commented 3 months ago

I have multiple problems. I can only find Character ID and my char_token. But no history ID. There is none. If I try other scripts, I get same error like others with Json.

vAdrian2424 commented 3 months ago

where did you find your char_token??

Pavex53 commented 3 months ago

where did you find your char_token??

You need to open the chat with your character in beta version. Write beta.character.ai etc. with normal version you can't see it

NoOneIsHereExceptMe commented 3 months ago

did anyone find the history_id?

Pavex53 commented 3 months ago

Didn't find it yet

Karvp commented 2 months ago

I know it's quite late but still hope this helpful to someone.

The history id is the value returned when you call get_chat() below a key named 'external_id'. You can see it quite clear in this example:

# ...
    data = client.chat.send_message(
        chat['external_id'], tgt, message
    )
# ...

For the json error, you might want to try #93

Pavex53 commented 2 months ago

He fixed it his code works now