A module for interacting with OpenAI using prompt.
Project description
OpenAI Utils
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 mr_openai_module
## 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
Release history Release notifications | RSS feed
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 mr_openai_module-0.1.1.tar.gz.
File metadata
- Download URL: mr_openai_module-0.1.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
129940bbc4e04b40057412056bbcadef7845561d2f5d45f4fc400b1f2e26d619
|
|
| MD5 |
a34872ea56e7098232c56717d4d52623
|
|
| BLAKE2b-256 |
90b1650c9990ab00b2e3ea12f8fee5a85860fdd8d67d52e9fe44d8933cf6cbd4
|
File details
Details for the file mr_openai_module-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mr_openai_module-0.1.1-py3-none-any.whl
- Upload date:
- Size: 1.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddf891a23c065165d811ffc6e42be692b6f23b1fde9387cf6be0dec71d9e6a39
|
|
| MD5 |
e38fd8937807181b98348a839f7aa00e
|
|
| BLAKE2b-256 |
55339cd6b757ee73a51f9122f300a06a1243b407e7479573ec80ec15aa6b2d2d
|