Skip to content

luojun96/go-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go-Chatbot

Introduction

This is a simple chatbot based on chatgpt, currently we use gpt-3.5-turbo model. and we interacts ChatGPT with the API with Go client library.

Getting Started

Currently you can get started with this chatbot by building from sources.

Build

Compiler Go 1.20+, checking the Go Installation to see how to install Go on your platform.

Use make to build and produce the chatboat binary file. The executable file will be placed in the build/bin directory.

make

Configure

Create a configuration file (e.g. $PWD/config.yaml) using the configuration template file at resources/config.yaml.

The following simple configuration example can be used to get started:

openai:
  token: "YOUR_API_KEY"

You can fetch API key from your OpenAI account .

Run

You can run the chatbot by executing the following command:

./build/bin/chatbot -f config.yaml
  • -f configuration file. It also can be achieved by setting the environment variable CHATBOT_CONFIG.

Demo

demo

About

A command line chatbot based on ChatGPT.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors