No project description provided
Project description
OpenAiManager
ChatManager
- Automatically store current chat history.
- Simple Chatting.
- Manually handle chat history.
- Automatically calculate tokens used.
init(openai_key)
- Resets chat history
- Tries to login using OpenAI API key
setup(system_message, model)
- Adds system message to the chat history
- Sets the AI model
say(message)
- Formats the message to work with OpenAI
- Gets the response using the model and chat history
- Returns the response
say_without_history(message)
- Gets the response using the model WITHOUT chat history
- Returns the response
show_history()
- Returns chat history
reset_history()
- Clears the history list
add_memory(memory, role)
- Adds the string message as a string to the chat history
remove_memory(memory, role)
- Checks if the string memory is in the chat history list
- Removes it from the chat history
get_all_tokens()
- Gets current chats tokens used
- Returns tokens used
get_string_tokens(message)
- Get string (message) tokens
- Returns tokens used
ImageManager
- Generate Images with prefered model
init(openai_key)
- Tries to login using OpenAI API key
setup(model)
- Sets the AI model
gen(message, size, quality, amount)
- Generates Images based off input (message)
- Specifies the image size (size)
- Specifies the image quality (quality)
- Generates 1-10 images (amount)
SpeechManager
- Convert Text to Speech
- Convert Speech to Text
init(openai_key)
- Tries to login using OpenAI API key
setup(model)
- Sets the AI model
TTS(voice, message, file_path)
- Converts Text (message) to Speech (voice)
- Creates audio file (file_path)
STT(file_path)
- Opens file (file_path)
- Converts Speech to Text (model from setup)
- Returns Speech to Text
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mllopenaimanager-1.1.0.tar.gz
.
File metadata
- Download URL: mllopenaimanager-1.1.0.tar.gz
- Upload date:
- Size: 5.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 370816e752607ab6a34b09a2869c7487a612e7869e15457fe9d31f1163fae7ef |
|
MD5 | b5ba4f6335e43fcc45fa8a23e532140a |
|
BLAKE2b-256 | d3032360d44a79d92d85ee3db80e1185170469bb7631d0df1b2801db4e5a5806 |
File details
Details for the file mllopenaimanager-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: mllopenaimanager-1.1.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9336ca8340cbe65b190ae929614751aeaed332c639914ad98195dd1a95561a1c |
|
MD5 | 57761d0db686058252b50286433db14c |
|
BLAKE2b-256 | ec6c86a82750381221df92f1056301fba4692ab448d50b81bea31fed13313d04 |