Skip to main content

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

Metadata

Release files for mllopenaimanager 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mllopenaimanager 1.1.0
File Size Uploaded
mllopenaimanager-1.1.0.tar.gz 5.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for mllopenaimanager 1.1.0
File Interpreter ABI Platform
mllopenaimanager-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.0 MB

Release files / mllopenaimanager-1.1.0.tar.gz

Download URL mllopenaimanager-1.1.0.tar.gz
Size 5.0 MB
Tags Source
SHA-256 checksum
How to use checksums
370816e752607ab6a34b09a2869c7487a612e7869e15457fe9d31f1163fae7ef
BLAKE2b-256 checksum
How to use checksums
d3032360d44a79d92d85ee3db80e1185170469bb7631d0df1b2801db4e5a5806
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Release files / mllopenaimanager-1.1.0-py3-none-any.whl

Download URL mllopenaimanager-1.1.0-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9336ca8340cbe65b190ae929614751aeaed332c639914ad98195dd1a95561a1c
BLAKE2b-256 checksum
How to use checksums
ec6c86a82750381221df92f1056301fba4692ab448d50b81bea31fed13313d04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

0.2.2

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page