ChatGptHub: Gpt Chatbot Library with LangChain Support
Project description
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,
)
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
chatgpthub-0.1.2.tar.gz
(9.6 kB
view details)
File details
Details for the file chatgpthub-0.1.2.tar.gz
.
File metadata
- Download URL: chatgpthub-0.1.2.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78d39a0413293eacbb4c9cb89bdce5ed717d2c3fb0bbcde35e68a4cb5f5b664b |
|
MD5 | d311d1a3e6be77a259b93da7d94297c4 |
|
BLAKE2b-256 | 03de6cf8faeaab8246ecceee304baa2ca0a659fa8c49fd093f8a0aa89d84eca9 |