Skip to main content

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

dyphira-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

dyphira-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

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

Hashes for dyphira-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3b41478d911e7ddfaf94aab36910307616ac0571d2a0fd1f87cf125b3327d010
MD5 43301872854237f270024b5c3ceaf38d
BLAKE2b-256 25261d8d171d1b149f419a4d8d397f839abda8ab131fc6432046478d676345d5

See more details on using hashes here.

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

Hashes for dyphira-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb22fbd0c3bff8b31ba5f0cf72c6737adf340b2441cad5ea56bb96226afd8cd2
MD5 5cd3fd7e578b905acda44138582f1b11
BLAKE2b-256 ab4b19b9dfb8a79694ffff932c2217023adf86b4ce1d5c1eadbd9a945558dae6

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