Skip to main content

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

mllopenaimanager-1.1.0.tar.gz (5.0 MB view details)

Uploaded Source

Built Distribution

mllopenaimanager-1.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

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

Hashes for mllopenaimanager-1.1.0.tar.gz
Algorithm Hash digest
SHA256 370816e752607ab6a34b09a2869c7487a612e7869e15457fe9d31f1163fae7ef
MD5 b5ba4f6335e43fcc45fa8a23e532140a
BLAKE2b-256 d3032360d44a79d92d85ee3db80e1185170469bb7631d0df1b2801db4e5a5806

See more details on using hashes here.

File details

Details for the file mllopenaimanager-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mllopenaimanager-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9336ca8340cbe65b190ae929614751aeaed332c639914ad98195dd1a95561a1c
MD5 57761d0db686058252b50286433db14c
BLAKE2b-256 ec6c86a82750381221df92f1056301fba4692ab448d50b81bea31fed13313d04

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page