Giter Club home page Giter Club logo

moki's Introduction

Latest Release Build Status

logo_moki Moki

An AI Assistant for the command line.

Tuned to assist with developer tasks like finding files, installing packages, and git.
Conversation mode can explain code snippets, generate unit tests, and scaffold new projects.

Usage

  • Install Moki:

    go install github.com/Ztkent/moki/cmd/moki@latest
  • Set your API key as an environment variable:

    export OPENAI_API_KEY=<your key>
    export ANYSCALE_API_KEY=<your key>
    export REPLICATE_API_TOKEN=<your key>
  • Run Moki:

    # Ask the assistant a question
    moki [your question]
    
    # Provide additional context
    cat moki.go | moki [tell me about this code]
    moki [tell me about this code]    -file:moki.go
    moki [tell me about this project] -url:https://github.com/Ztkent/moki
    
    # Start a conversation with the assistant
    moki -c
    moki -c -m=turbo -max-tokens=100000 -t=0.5

Example

Moki.mp4

Configuration

Flags:
  -c:                        Start a conversation with Moki
  -llm:                      Set the LLM Provider
  -m:                        Set the model to use for the LLM response
  -max-tokens:               Set the maximum number of tokens to generate
  -t:                        Set the temperature for the LLM response
  -d:                        Show debug logging

Model Options:
  - OpenAI:
    - [Default] gpt-3.5-turbo, aka: turbo35
    - gpt-4-turbo, aka: turbo
    - gpt-4o, aka: gpt4o
  - Anyscale:
    - [Default] meta-llama-3-8b, aka: l3-8b
    - meta-llama-3-70b, aka: l3-70b
    - mistralai/Mixtral-8x7B-Instruct-v0.1, aka: m8x7b
    - mistralai/Mistral-7B-Instruct-v0.1, aka: m7b
    - codellama/CodeLlama-70b-Instruct-hf, aka: cl70b
  - Replicate:
    - [Default] meta-llama-3-8b, aka: l3-8b
    - meta-llama-3-8b-instruct, aka: l3-8b-instruct
    - meta-llama-3-70b, aka: l3-70b
    - meta-llama-3-70b-instruct, aka: l3-70b-instruct

Conversation

The assistant can be used in conversation mode.
This allows the assistant to generate more in-depth responses.

moki -c

API Provider

By default the assistant will use OpenAI. To use another, run the assistant with a flag.

moki -llm=openai
moki -llm=anyscale 
moki -llm=replicate 

Model

Depending on the LLM Provider selected, different models are available.

moki -m=turbo
moki -m=m8x7b
moki -m=l3-70b

Token Limit

Tokens cost money.
By default the assistant will limit any conversation to 100k tokens.

moki -max-tokens=100000

Temperature

The temperature of an LLM response is a measure of randomness.
The value float between 0 and 1. By default the temperature is 0.2

moki -t=0.5

moki's People

Contributors

ztkent avatar

Stargazers

franklin stewart avatar

Watchers

 avatar

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.