Skip to main content

ChatGptHub: Gpt Chatbot Library with LangChain Support

downloads pypi version

This repo is a implementation of the ChatGPT Models with LangChain support.

Installation

pip install chatgpthub

Usage

from chatgpthub import ChatGptHubDemo

# translate chatgpt model

demo = ChatGptHubDemo(
    openai_key="openai_key",
    promptlayer_key="promptlayer_key", #optional
)

# translate chatgpt model

demo.translate(
    model_name = "gpt-3.5-turbo",
    input_language = "English",
    output_language = "Turkish",
    text = "Hello, how are you?",
    temperature = 0.0,
)

# promptlayer chatgpt model

demo.promptlayer(
    model_name = "gpt-3.5-turbo",
    text = "Hello, how are you?",
    temperature = 0.0,
)

# custom template chatgpt model

template = "You are a helpful assistant that python to c++ and you are asked to translate the following text: {text}"
text = "print('Hello, world!')"
output = demo.custom_template(
    model_name="gpt-3.5-turbo",
    template=template,
    input_variables="text",
    text=text,
    temperature=0.0,
)

Metadata

Release files for chatgpthub 0.1.2

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

Source distribution (sdist)

Source distribution for chatgpthub 0.1.2
File Size Uploaded
chatgpthub-0.1.2.tar.gz 9.6 kB Details

Release files / chatgpthub-0.1.2.tar.gz

Download URL chatgpthub-0.1.2.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
78d39a0413293eacbb4c9cb89bdce5ed717d2c3fb0bbcde35e68a4cb5f5b664b
BLAKE2b-256 checksum
How to use checksums
03de6cf8faeaab8246ecceee304baa2ca0a659fa8c49fd093f8a0aa89d84eca9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Release history Release notifications | RSS feed

This release

0.1.2 This release

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

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