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)
| 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
|