gochat

module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2024 License: MIT

README

gochat

Description

A simple AI "chat" shell (similar to ChatGPT) which can be used to "converse" with one of the supported large language models, and optionally record your "chat transcript" in a local file, making it easy to later reference your conversations with these models.

Currently Available!

Model Support

This app is designed to support access to multiple underlying chat models, including:

If you're not yet signed up to access either of these popular online language models, what are you waiting for? Clear instructions for obtaining your SDK Key needed to access each model on its "SDK" page using the link(s) above!

Configuration

Copy the file config/config.yaml into config/config-local.yaml in order to create your own, private configuration.

In your private configuration (i.e., config-local.yaml), select the model you wish to use, and enter your credentials for accessing that model before running.

If you wish to create transcripts of your chat sessions, set the Scriber adapter value to Template, and - if needed - customize its formatting in the TemplateScribe sections, taking guidance from the go Templating language documentation.

Running

You will need to have go installed in order to run gochat in your terminal. If you don't already have this, see here to find out how.

In a go (version 1.21 or later) environment, run the app using the Makefile target, e.g.:

$ make run-chat
go run cmd/chat/main.go
Using model: gpt-4-1106-preview
Type 'exit' to quit
Ask me anything: 
> Tell me in three words who you are.
Artificial Intelligence Assistant
> exit
Goodbye!
Bye bye!
$ 

Future Roadmap

Several planned enhancements for gochat in its Roadmap include:

Retrieval Augmented Generation (RAG)
Fully local LLMs
  • Add support for "chats" against confidential information, and/or without the need for internet connection, such as possible with ollama.
Want to Contribute? Have Ideas?
  • Please get in touch!
  • Please submit a PR!

Directories

Path Synopsis
cmd
internal
adapter
Package adapter provides code for connecting the application to external systems or services.
Package adapter provides code for connecting the application to external systems or services.
adapter/chatter
Package chatter contains adapters for interacting with chat models.
Package chatter contains adapters for interacting with chat models.
adapter/scriber
Package scriber contains adapters for transcribing a chat session.
Package scriber contains adapters for transcribing a chat session.
config
Package config contains code related to application configuration.
Package config contains code related to application configuration.
controller
Package controller provides handlers for incoming requests, mapping them to actions within the application.
Package controller provides handlers for incoming requests, mapping them to actions within the application.
model
Package model provides application data structures shared between other packages.
Package model provides application data structures shared between other packages.
service
Package service contains core application logic.
Package service contains core application logic.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL