Skip to main content

A module for interacting with OpenAI using prompt.

Project description

OpenAI Utils

PyPI - Python Version PyPI - License PyPI - Downloads

OpenAI Utils is a simple, reusable Python module that makes it easy to interact with the OpenAI API. It provides utility functions for generating text completions, listing available models, and more. This package is designed for developers who want to integrate OpenAI's powerful language models into their applications with minimal setup.

Features

  • Text Completion: Generate text based on a prompt using various OpenAI models.
  • Model Listing: Easily retrieve a list of available OpenAI models.
  • Customizable: Adjust parameters like temperature, max tokens, and more to fit your needs.

Installation

You can install the package directly from PyPI:

pip install mahul-openai-utils

## Usage

from mr_openai_module.openai_client import OpenAIClient

client = OpenAIClient(api_key="your_openai_api_key")
response = client.generate_text("Tell me a joke.")
print(response)

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

mr_openai_module-0.1.0.tar.gz (1.7 kB view details)

Uploaded Source

Built Distribution

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

mr_openai_module-0.1.0-py3-none-any.whl (1.8 kB view details)

Uploaded Python 3

File details

Details for the file mr_openai_module-0.1.0.tar.gz.

File metadata

  • Download URL: mr_openai_module-0.1.0.tar.gz
  • Upload date:
  • Size: 1.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.0

File hashes

Hashes for mr_openai_module-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d3f0a77198cfd24010972098df86e472e86a7729f7cc10329353fb0b57ca144e
MD5 9931b63ba625532a3071268eaa80a2ce
BLAKE2b-256 152afe5926e9518679066098b187f1ef217319d1ba71f36d5e000439d27ac62d

See more details on using hashes here.

File details

Details for the file mr_openai_module-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mr_openai_module-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97a7610966d42e806b5a129e2b842ce304e785e56c46c857f66a60722cde643b
MD5 4e226152fd88d951d74d697257251ecd
BLAKE2b-256 da7f5c67161a9441170ccf90a42d0ad0b7aaf80d22f802b160bf10222b68d7c9

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