Skip to content

Simple and convenient API for interacting with ChatGPT.

License

Notifications You must be signed in to change notification settings

SOSREBET/ChatGPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

The purpose of this repository is an easy way to interact with ChatGPT (with a dialog context) in python.

Usage

Because it uses the asynchronous way of chatting with ChatGPT, you will need an asynchronous context.

chat = ChatGPT()
r = await chat.ask_question(message="test")
print(r["context")

# Output: This is just a test message. Please ignore it. Thank you.

But also ask_question can be called with asyncio

import asyncio
chat = ChatGPT()
r = asyncio.run(chat.ask_question(message="test"))
print(r["content"])

# Output: This is just a test message. Please ignore it. Thank you.

About

Simple and convenient API for interacting with ChatGPT.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages