Skip to main content

OpenAI Chat Python Lib

Requirements

python: >=3.9

Installation

pip install openaichatlib

Usage

from openaichatlib.V3 import Chatbot

bot = Chatbot(
    api_key="YOUR_API_KEY", 
    api_url="YOUR_API_HOST", # default is https://api.openai.com/v1/chat/completions
    engine='gpt-3.5-turbo-16k',
    timeout=120, 
    max_tokens=15_000, 
    proxy="YOUR_PROXY_URL", # like http://127.0.0.1:7890
    system_prompt="You are ChatGPT, a large language model trained by OpenAI"
)

reply = bot.ask("Hello")
print(reply)

Metadata

Release files for openaichatlib 1.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openaichatlib 1.1.5
File Size Uploaded
openaichatlib-1.1.5.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openaichatlib 1.1.5
File Interpreter ABI Platform
openaichatlib-1.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 12.7 kB

Release files / openaichatlib-1.1.5.tar.gz

Download URL openaichatlib-1.1.5.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6a8b8c77b7eea10b9af327ac5aaafa30a2b9e24c888869708e3131670f4399e4
BLAKE2b-256 checksum
How to use checksums
6c1d1c183043b1dbf676b420d3b81ce8887172c11ab4b86673eba6908255367a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.9.19

Release files / openaichatlib-1.1.5-py3-none-any.whl

Download URL openaichatlib-1.1.5-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9066e6f0056b263970805b7616ec75804cbd6523bb448bcca4d2556801afafbc
BLAKE2b-256 checksum
How to use checksums
40649f02f5f515907b17b634660a186597b88147fb44510d1b316fb9d4618b17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.9.19

Release history Release notifications | RSS feed

This release

1.1.5 This release

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page