CharacterAI
  • 👋Welcome
  • 🧑‍💻Quick Start
  • 🛠️API
    • 🔑 Values
    • ⚠️ Errors
    • connect
    • ping
    • user
      • info
      • get_profile
      • followers
      • following
      • recent
      • update
    • post
      • get_post
      • my_posts
      • get_posts
      • upvote
      • undo_upvote
      • send_comment
      • delete_comment
      • create
      • delete
      • get_topics
      • feed
    • character
      • create
      • update
      • trending
      • recommended
      • categories
      • info
      • search
      • voices
    • chat
      • create_room
      • rate
      • next_message
      • get_histories
      • get_history
      • get_chat
      • send_message
      • delete_message
      • new_chat
    • chat2
      • next_message
      • send_message
      • get_histories
      • new_chat
      • get_chat
      • get_history
      • rate
      • delete_message
  • 📚Examples
    • Chatting
    • Parse Chat
  • ⚠️Issues
Powered by GitBook
On this page
  • char [str]
  • chat_id [str]
  • text [str]
  • author [dict]
  1. API
  2. chat2

send_message

Sending a message to a character

async with client.connect('TOKEN') as chat2:
    await chat2.send_message('CHAR', 'CHAT_ID', 'TEXT', {AUTHOR})

char [str]

Character ID

chat_id [str]

Unique ID for character history

text [str]

Message text

author [dict]

You must specify who is sending the message. You can write anything in the name

{
    'author_id': 'YOUR ID',
    'is_human': True,
    'name': 'NAME'
}

Previousnext_messageNextget_histories

Last updated 1 year ago

🛠️