Metadata-Version: 2.4
Name: easier-openai
Version: 4.4
Summary: Utilities for orchestrating OpenAI chat, tool calling, search, audio, and images from one helper package.
Author-email: Advik Mathur <pranit.advik@gmail.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/Adpros7/easier-gpt
Project-URL: Repository, https://github.com/Adpros7/easier-gpt
Project-URL: Documentation, https://github.com/Adpros7/easier-gpt
Project-URL: Issues, https://github.com/Adpros7/easier-gpt/issues
Keywords: openai,assistant,chat,responses,audio,images,vector,speech
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: openai
Requires-Dist: simpleaudio
Requires-Dist: openai-stt
Requires-Dist: typing-extensions
Requires-Dist: huggingface-hub
Requires-Dist: pygame
Requires-Dist: playsound3
Provides-Extra: speech-models
Requires-Dist: openai-whisper>=20250625; extra == "speech-models"
Dynamic: license-file

# 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
```bash
pip install easier-openai
```

Optional extras:
```bash
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
```python
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
```python
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
```python
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](LICENSE).
