Releases: kramcat/CharacterAI
Fix JSON, Auth, Images, Pydantic, New Docs
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
Much faster, chat2, Fixes
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
Managing Posts and Characters, Upload Images, Create Rooms
Changes:
- Small fixes by KubaPro010
- Private variables
start()
forPyCAI
- Added
plus
forstart()
- Added
timeout
forstart()
- Added
ping()
- Added
upload_image('PATH')
- Added
user.update('USERNAME')
- Added the
post
classpost.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
Documentation, New Functions, Fixes
Changes:
- Name of
pyCAI
changed toPyCAI
- Name of
pyAsyncCAI
changed toPyAsyncCAI
- Written documentation
- 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
POST methods, New chat.get_histories()
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
New chat.send_message(), Async, Fixes
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 tocharacter.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)
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
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())
Fixed Functions, New Parameters
New Release! List of changes:
- Fix broken functions
- Remove
user.get_history
in async (I'll add in next version) - Add
token
parameter on all functions for custom token - Add
wait
parameter on all functions for waiting a responce when site is overloaded - Add
headless
parameter onpyCAI
for browser (I don't know why, but suddenly you need) - Other changes (I don't remember which ones)