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 in one place.

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.
  • 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-0.3.11.tar.gz (15.9 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-0.3.11-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for easier_openai-0.3.11.tar.gz
Algorithm Hash digest
SHA256 22621130d98fa4b1c8516a58aba15779426a69fc296205b14b4c3a056e60e7b7
MD5 ae38e4fc6b480eca98aea9701ad357cf
BLAKE2b-256 91e95e61ffca6945f658eff4713006a6ae72d867595d62967582706ca2f970e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for easier_openai-0.3.11-py3-none-any.whl
Algorithm Hash digest
SHA256 39c4219e5d97213c9d377a79127b8f201b2288f387ee158a6012a8cf8e1f6331
MD5 340fe8fc9c39ae6cadee7b760e0c5fe7
BLAKE2b-256 da27c95680535c98744138f518183571928e392ddedf65db1659365e7dd01138

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