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
  • name [str]
  • characters [str]
  • topic [str]
  • token [str] (optional)
  1. API
  2. chat

create_room

Creating a room with multiple characters

client.chat.rate('CHAR', RATE)
from characterai import PyCAI

client = PyCAI('TOKEN')

characters = [
    {'value': 'CHAR'},
    {'value': 'CHAR'}
]

chat = client.chat.create_room(
    characters, 'NAME'
)

print(chat)
import asyncio
from characterai import PyAsyncCAI

async def main():
    client = PyAsyncCAI('TOKEN')
    
    characters = [
        {'value': 'CHAR'},
        {'value': 'CHAR'}
    ]

    chat = await client.chat.create_room(
        characters, 'NAME'
    )
    
    print(chat)

asyncio.run(main())

name [str]

Examples: Lincoln-Einstein, Music Lovers, Sci-Fi discuss

characters [str]

Please enter the names or ids of the characters you want to add to this room. Note: Only the top 5000 public characters are available for now

topic [str]

What should happen in this room. Characters will try to follow it. Examples: Play by play superhero battle, Discuss the latest episode of Game of Thrones

token [str] (optional)

You can set a specific token for the function, it will be executed from the specified token

PreviouschatNextrate

Last updated 1 year ago

🛠️