Git Product home page Git Product logo

neural's Introduction

โšก Neural

Vim Neovim CI Join the Dense Analysis Discord server

A ChatGPT Vim plugin, an OpenAI Neovim plugin, and so much more! Neural integrates various machine learning tools so you can let AI write code for you in Vim/Neovim, among other helpful things.

๐ŸŒŸ Features

  • Generate text easily :Neural write a story
  • Support for multiple machine learning models
  • Focused on privacy and avoiding leaking data to third parties
  • Easily ask AI to explain code or paragraphs :NeuralExplain
  • Compatible with Vim 8.0+ & Neovim 0.8+
  • Supported on Linux, Mac OSX, and Windows
  • Only dependency is Python 3.7+

Experience lightning-fast code generation and completion with asynchronous streaming.

Edit any kind of text document. It can be used to generate Python docstrings, fix comments spelling/grammar mistakes, generate ideas and much more. See examples from OpenAI for a start.

๐Ÿ”Œ Plugin Integrations

If the following plugins are installed, Neural will detect them and start using them for a better experience.

๐Ÿช„ Installation

Add Neural to your runtime path in the usual ways.

If you have trouble reading :help neural, try the following.

packloadall | silent! helptags ALL

Vim packload:

git clone --depth 1 https://github.com/dense-analysis/neural.git ~/.vim/pack/git-plugins/start/neural

Neovim packload:

git clone --depth 1 https://github.com/dense-analysis/neural.git ~/.local/share/nvim/site/pack/git-plugins/start/neural

Windows packload:

git clone --depth 1 https://github.com/dense-analysis/neural.git ~/vimfiles/pack/git-plugins/start/neural
Plug 'dense-analysis/neural'
    Plug 'muniftanjim/nui.nvim'
    Plug 'elpiloto/significant.nvim'
Plugin 'dense-analysis/neural'

๐Ÿš€ Usage

You will need to configure a third party machine learning tool for Neural to interact with. OpenAI is Neural's default data source, and one of the easiest to configure.

You will need to obtain an OpenAI API key. Once you have your key, configure Neural to use that key, whether in a Vim script or in a Lua config.

" Configure Neural like so in Vimscript
let g:neural = {
\   'source': {
\       'openai': {
\           'api_key': $OPENAI_API_KEY,
\       },
\   },
\}
-- Configure Neural like so in Lua
require('neural').setup({
    source = {
        openai = {
            api_key = vim.env.OPENAI_API_KEY,
        },
    },
})

Try typing :Neural say hello, and if all goes well the machine learning tool will say "hello" to you in the current buffer. Type :help neural to see the full documentation.

๐Ÿ› ๏ธ Commands

:NeuralExplain

You can ask Neural to explain code or text by visually selecting it and running the :NeuralExplain command. You may also create a custom keybind for explaining a visual range with <Plug>(neural_explain).

Neural will make basic attempts to redact lines that appear to contain passwords or secrets. You may audit this code by reading autoload/neural/redact.vim

:NeuralStop

You can stop Neural from working by with the NeuralStop command. Unless another keybind for <C-c> (CTRL+C) is defined in normal mode, Neural will run the stop command by default when you enter that key combination. The default keybind can be disabled by setting g:neural.set_default_keybinds to any falsy value. You can set a keybind to stop Neural by mapping to <Plug>(neural_stop).

๐Ÿ“œ Acknowledgements

Neural was created by Anexon, and is maintained by the Dense Analysis team.

Special thanks are due for the following individuals:

โ„น๏ธ Disclaimer

All input data will be sent to third party servers in order to query the machine learning models.

Language generation models based on the transformer architecture have shown strong performance on a variety of natural language tasks such as summarization, language translation and generating human-like text.

Open AI's Codex model has been fine-tuned for code generation tasks and can generate patterns and structures of programming languages using attention mechanisms to focus on specific parts of the input sequence.

๐Ÿšจ Use generated code in production systems at your own risk!

Although the resulting output is usually syntactically valid, it must be carefully evaluated for correctness. Use a linting tool such as ALE to check your code for correctness.

๐Ÿ“™ License

Neural is released under the MIT license. See LICENSE for more information.

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.