Skip to main content

Utilities for orchestrating OpenAI chat, tool calling, search, audio, and images from one helper package.

Project description

Easier OpenAI

Easier OpenAI wraps the official OpenAI Python SDK so you can drive modern assistants, manage tool selection, search files, and work with speech from one helper package—the easiest possible way.

What's Included

  • Conversational Assistant helper with conversation memory and tool toggles.
  • Temporary vector store ingestion to ground answers in local notes.
  • Built-in helpers for image generation and text-to-speech playback.
  • Speech-to-text recording shortcuts for quick dictation.
  • Lazy-loaded imports so import easier_openai stays fast even when optional helpers expand.
  • Optional openai_function decorator re-exported for function tool schemas.

Installation

pip install easier-openai

Optional extras:

pip install "easier-openai[function_tools]"   # decorator helpers
pip install "easier-openai[speech_models]"    # whisper speech recognition models

Set OPENAI_API_KEY in your environment or pass it explicitly when constructing the assistant.

Quick Start

from easier_openai import Assistant

assistant = Assistant(api_key=None, model="gpt-4o", system_prompt="You are concise.")
response_text = assistant.chat("Summarize Rayleigh scattering in one sentence.")
print(response_text)

Ground replies with your files

notes = ["notes/overview.md", "notes/data-sheet.pdf"]
reply = assistant.chat(
    "Highlight key risks from the attached docs",
    file_search=notes,
    tools_required="auto",
)
print(reply)

Generate speech from responses

assistant.full_text_to_speech(
    "Ship a status update that sounds upbeat",
    model="gpt-4o-mini-tts",
    voice="alloy",
    play=True,
)

Requirements

  • Python 3.10 or newer
  • openai>=1.43.0
  • typing_extensions>=4.7.0
  • pydantic>=2.0.0

Contributing

Issues and pull requests are welcome. Please run checks locally before submitting changes.

License

This project is licensed under the Apache License 2.0.

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

easier_openai-4.3.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easier_openai-4.3-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file easier_openai-4.3.tar.gz.

File metadata

  • Download URL: easier_openai-4.3.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for easier_openai-4.3.tar.gz
Algorithm Hash digest
SHA256 ee474c01a3ed26f9355e19084424d541bb6bb52de7e0fe2d617e76ee970bdfa0
MD5 dac38d72f7e24030b0833f2f17f05674
BLAKE2b-256 55532999bd97fd591cf006dcf9dcc0a35ae6c788c5b46f149293be92e23e9555

See more details on using hashes here.

File details

Details for the file easier_openai-4.3-py3-none-any.whl.

File metadata

File hashes

Hashes for easier_openai-4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fd40a2b5b1a21726834c2a6edb19042a47e5f1aa8e14e826061052dd0c2fd88f
MD5 20556511ddc460e6ea191e9813939a85
BLAKE2b-256 2360633da58c0983427180351f9bf4799ca7ed9be624930c05e4cef34dc0fded

See more details on using hashes here.

Supported by

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