A Python package for interacting with OpenAI APIs via Dyphira proxy server.
Project description
Dyphira Python
A Python package for interacting with OpenAI APIs via Dyphira proxy server.
Installation
You can install the package via pip:
pip install dyphira
Usage
Basic Example
from dyphira import OpenAI
# Initialize with your API key
client = OpenAI("your-api-key")
# Generate an image
response = client.images_generations("A cat with a hat.")
print(response)
Available Features
The package provides access to the following OpenAI API endpoints:
- Chat & Completions: Generate text responses
- Images: Generate, edit, and create variations of images
- Embeddings: Create text embeddings
- Audio: Transcribe, translate, and generate speech
- Files: Upload, list, and manage files
- Fine-tuning: Create and manage fine-tuning jobs
- Moderations: Check content compliance
- Assistants: Create and manage AI assistants
Documentation
Chat Completions
response = client.chat_completions(
model="gpt-4",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
]
)
Image Generation
response = client.images_generations(
prompt="A sunset over mountains",
model="dall-e-3",
size="1024x1024"
)
License
This project is licensed under the MIT License - see the LICENSE file for details.
Links
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dyphira-0.1.0.tar.gz.
File metadata
- Download URL: dyphira-0.1.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b41478d911e7ddfaf94aab36910307616ac0571d2a0fd1f87cf125b3327d010
|
|
| MD5 |
43301872854237f270024b5c3ceaf38d
|
|
| BLAKE2b-256 |
25261d8d171d1b149f419a4d8d397f839abda8ab131fc6432046478d676345d5
|
File details
Details for the file dyphira-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dyphira-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb22fbd0c3bff8b31ba5f0cf72c6737adf340b2441cad5ea56bb96226afd8cd2
|
|
| MD5 |
5cd3fd7e578b905acda44138582f1b11
|
|
| BLAKE2b-256 |
ab4b19b9dfb8a79694ffff932c2217023adf86b4ce1d5c1eadbd9a945558dae6
|