Characterai

Latest version: v1.0.1

Safety actively analyzes 623936 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

1.0.0a1

The new version of the library has been completely rewritten and is close to stable release. Even though the version is alpha, you need to install it instead of 0.8.0

Your old code won't work, you need to re-read the documentation

**Changes:**
- Adding authorization via mail and as a guest
- Fix old bugs related to authorization by token and chat2
- Added ability to download and upload pictures
- Improved performance by switching to curl_cffi
- Adding typing via Pydantic
- Added new features: modify and pin character messages
- Moved documentation to Sphinx Furo
- PyAsyncCAI name changed to AioCAI

**CHECK NEW DOCS AT [DOCS.KRAM.CAT](https://docs.kram.cat)**

0.8.0

Changes:
- There is no Playwright anymore, another library is used that does not load the system (!!!)
- Added chat2 support (new chats with a different design)
- Deleted client.upload_image()
- Deleted client.start()
- chat2 is only available in the asynchronous version
- Fixes and improvements

Check out the documentation to find out how chat2 works

0.7.0

Changes:
- Small fixes by KubaPro010
- Private variables
- `start()` for `PyCAI`
- Added `plus` for `start()`
- Added `timeout` for `start()`
- Added `ping()`
- Added `upload_image('PATH')`
- Added `user.update('USERNAME')`
- Added the `post` class
- `post.get_post('POST_ID')`
- `post.my_posts()`
- `post.get_posts('USERNAME')`
- `post.upvote('POST_ID')`
- `post.undo_upvote('POST_ID')`
- `post.send_comment('POST_ID', 'TEXT')`
- `post.delete_comment('MESSAGE_ID', 'POST_ID')`
- `post.create('HISTORY_ID', 'TITLE')`
- `post.delete('POST_ID')`
- Added `character.create(...)`
- Added `character.update(...)`
- Added `character.voices()`
- Added `character.create_room('CHARACTERS', 'NAME', 'TOPIC')`
- Some fixes for parameters, check documentation
- Some optimization
- Added kwargs for functions

The library has a discord server!
If you have any questions/problems/suggestions or you just want to talk about AI and CharacterAI - welcome to my new Discord server

**[discord.gg/CZdQWzMV](https://discord.gg/CZdQWzMV)**

0.6.0

Changes:
- Name of `pyCAI` changed to `PyCAI`
- Name of `pyAsyncCAI` changed to `PyAsyncCAI`
- Written [documentation](https://pycai.gitbook.io/welcome/)
- Fix error 500
- Added more errors
- Added `chat.rate('CHAR', RATE)`
- Added `chat.next_message('CHAR')`
- Added `chat.get_chat('CHAR')`
- Added `chat.delete_message('HISTORY_ID', 'UUIDS_TO_DELETE')`
- Fixed showing filtered messages
- Code changed to PEP8

0.5.0

List of changes
- Now some functions work via POST requests, it's faster and more reliable
- Fixed `chat.new_chat()`
- `chat.send_message()` was rewritten
- Instead of an error, it returns an error page
- This function can show a message even if it is filtered
- Fixed bugs with JSON
- New `chat.get_histories('CHAR')`
- This function returns all the stories with the character
- Find users by nickname with `user.info('NICKNAME')`
- This function returns information about the user

0.4.0

New Release! List of changes:
- Add user.get_history in async
- Fix `chat.new_chat()`
- New `chat.send_message()`
- New `chat.get_history()`
- `character.get_info()` rename to `character.info()` and rewritten
- Add `character.search()`
- Add `user.recent()`
- Fix small bugs

More detailed
Fix chat.new_chat()
This function has been rewritten and now returns a json response, and also gets a response faster than the site (thanks to [HearYourWaifu](https://greasyfork.org/en/scripts/456393-hearyourwaifu-hyw))

Add character.search()
Now you can search for characters

`character.search('TEXT')`

Add user.recent()
Now you can view the latest chats

`user.recent()`

Fix Async
in previous versions, the asynchronous code was not finalized, now it is fully working

python
import asyncio
from characterai import pyAsyncCAI

async def main():
client = pyAsyncCAI('TOKEN')
await client.start(headless=True)

while True:
message = input('You: ')
data = await client.chat.send_message('TOKEN', message, wait=True)
print(f"{data['src_char']['participant']['name']}: {data['replies'][0]['text']}")

asyncio.run(main())

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.