Giter Club home page Giter Club logo

assistant's Introduction

assistant

Assitant built with ChatGPT!

Quick start

  1. Clone the repo
git clone https://github.com/bjwswang/assistant
  1. Install dependencies
cd assistant
go mod tidy
  1. Set configuration in assistant.json

see [Configurations](## Configurations) for more details

  1. Build the assistant server and CLI
make build

When build is done,you will get two binaries in bin directory.

  • assistant is the assistant server
  • acli is the assistant CLI which can interact with the assistant server
  1. Start the assistant server
./bin/assistant --config assistant.json
  1. Test the assistant
curl -XGET http://localhost:9999

Output should be

Welcome to AI Assistant ๐Ÿ‘‹!

Configurations

Parameter Description Default
addr The address which assistant server will watch :9999
assistant.api_key OpenAI api key sk-xxx
assistant.chat.xxx OpenAI model configuration for Chat model:gpt-3.5-turbo temperature:0.5 max_tokens:100
assistant.unit_test.xxx OpenAI model configuration for generating unit tests model:gpt-3.5-turbo temperature:0.5 max_tokens:100
fiber.xxx Fiber related parameters see the official document

APIs

  1. Normal chat
  • path: /chat
  • method: post
  • paramters:
    • question: the question you want to chat with the assistant
  1. Generate unit test
  • path: /ut
  • method: post
  • paramters:
    • code: the code you want to used for generating unit tests

CLI

  1. Chat with assistant
./bin/acli --server http://localhost:9999 chat --question "What is AI assistant in 10 words?"
  1. Generate unit tests
./bin/acli --server http://localhost:9999 ut --file {filepath_to_source_code_}"

Contribute to assistant

Welcom to contirbute to this AI assistant!

assistant's People

Contributors

bjwswang avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

assistant's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.