NextJS Project
- Add openai-wrapper.ts in lib folder in NextJS Project
-
Examples
Example usage
if name == "main": # Initialize the wrapper wrapper = SimpleOpenAIWrapper( service_provider="openai", max_retries=3 )
# Generate a response
system_prompt = "You are a helpful assistant."
user_prompt = "Explain the significance of the Pythagorean theorem."
response = wrapper.generate_response(
system_prompt=system_prompt,
user_prompt=user_prompt,
model="gpt-4",
max_tokens=150,
output_format="str"
)
print("Response:", response)
Metadata
Release files for opengig_openai_wrapper 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| opengig_openai_wrapper-0.1.1.tar.gz | 2.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| opengig_openai_wrapper-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.7 kB
Release files / opengig_openai_wrapper-0.1.1.tar.gz
| Download URL | opengig_openai_wrapper-0.1.1.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6e4aca5ccac7330663e5e55550362612eb8dc5a13fc9cf033eb78eb3dace6b9
|
|
BLAKE2b-256 checksum How to use checksums |
e2877518b80ecb75ed04892d7df8e6116d863f9fbe7fb7ee5f799b2995d910a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.13.1 Darwin/23.3.0
|
Release files / opengig_openai_wrapper-0.1.1-py3-none-any.whl
| Download URL | opengig_openai_wrapper-0.1.1-py3-none-any.whl |
|---|---|
| Size | 3.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7663f49818af721dfe839264c26b2c4b203d40633a8a244a2f39685e9cd4e253
|
|
BLAKE2b-256 checksum How to use checksums |
f603c89711526d33b1dd18a66556cb0ff9d71d19981296329471a6b525632f28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.13.1 Darwin/23.3.0
|