Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Enhance Your AI Applications with ChatGPT Wrapper - Secure Email Authentication, Context Support, and All GPT Models in Golang!

License

NotificationsYou must be signed in to change notification settings

AmarnathCJD/ChatGPT

Repository files navigation

ChatGPT
ChatGPT - A Golang wrapper for the GPT model from OpenAI

ChatGPT

GoDocGo Report CardGitHub licenseGitHub ActionsDiscuss on Telegram

ChatGPT is a wrapper for theGPT model from OpenAI purely built on Golang. The application has various features, including asking questions and getting responses, remembering the context of the conversation, exporting the conversation to a file, and importing the conversation from a file.

The app also allows users to get the conversation history, use multiple models such asdavinci,gpt 3,gpt 3.5, andgpt 4. Other features include API Key Authentication, Customizable temperature of the model, Inbuilt Tokenizer for the model, and http/https proxy support for the client.

Table of Contents

Features

Here are some notable features of the wrapper:

  • Authenticate using the API Key, which can be obtained from theOpenAI Dashboard.
  • Authenticate using theaccess_token oremail/password.
  • Cache the authentication token for future use.
  • Multiple Accounts support, with same cache file.
  • Remember the context of the conversation.
  • Export the conversation to a file.
  • Get the conversation history.
  • Models:davinci,gpt 3,gpt 3.5,gpt 4.
  • API Key Authentication.
  • Customizable temperature of the model.
  • Inbuilt Tokenizer for the model.
  • https Proxy support for the client.
  • Support for streaming the response via a channel.

TODO

Below are some things that need to be added to the application:

  • Implement theinternet plugin for theGPT model.
  • Add support for thetop_p parameter.

Documentation

You can find the complete documentation for theCHATGPT package atGoDoc

Installation

You can install ChatGPT by running the following command on your terminal:

go get github.com/amarnathcjd/chatgpt

Or usking gopkg.in:

go get gopkg.in/chatgpt.v1

Usage

Here is an example of how to use ChatGPT package:

package chatgptimport ("fmt""context""github.com/amarnathcjd/chatgpt")funcmain() {client:=chatgpt.NewClient(&chatgpt.Config{Email:"email@domain.com",Password:"password",// or ApiKey: "sk-xxxxxxxxxxxx",    })iferr:=client.Start();err!=nil {panic(err)     }ask,err:=client.Ask(context.Background(),"Hello, nice to meet you")iferr!=nil {panic(err)    }fmt.Println("ChatGPT: ",ask.Message)}

More examples can be found in theexamples folder.

License

ChatGPT is released under the terms of the GPT-3 License. SeeLICENSE for more information or seeThe GPT-3 License.

About

Enhance Your AI Applications with ChatGPT Wrapper - Secure Email Authentication, Context Support, and All GPT Models in Golang!

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp