Coder Social home page Coder Social logo

igor's Introduction

Igor.el

A package that provides an assistant to access OpenAI API and write or rewrite code.

Requirements

This package requires the request library to be installed.

Functions

igor-select-model (&optional initial-model)

This function prompts the user to select an OpenAI model and store it in igor-openai-model. If initial-model is provided, set the model to that without prompting the user.

igor-eldoc-function (callback &rest _)

This function displays a summary and example code for the symbol at point. It obtains the summary and code by using the xref-backends to find the definition of the symbol at point and converting the definition into org-mode format.

igor-install-eldoc-backend ()

This function installs the igor eldoc backend. It adds the igor-eldoc-function to the eldoc-documentation-functions.

igor-code-query (language query code callback)

This function performs a QUERY on CODE in LANGUAGE and sends the response to CALLBACK.

igor-code-query-region (start end query)

This function performs a QUERY on the region from START to END and displays the response in the help buffer.

igor-code-explain-region (start end)

This function explains the code in the region from START to END and displays the response in buffer.

igor-do (instruction)

This function generates an elisp expression from INSTRUCTION and asks the user whether to evaluate it.

igor-code-write (language instruction callback)

This function writes code in a given LANGUAGE according to an INSTRUCTION.

igor-code-write-at-point (instruction)

This function writes code at point according to an INSTRUCTION provided by the user.

igor-code-rewrite (language instruction code callback)

This function rewrites the provided CODE according to an INSTRUCTION.

igor-code-rewrite-region (start end instruction)

This function rewrites the code in the region between START and END according to INSTRUCTION.

igor-mode

The package’s minor mode.

Customizations

  • igor-openai-token: Your OpenAI API token.
  • igor-openai-model: The OpenAI model to use.
  • igor-openai-temperature: The temperature used in OpenAI requests.
  • igor-openai-response-max-tokens: The max tokens wanted in OpenAI responses.

Key bindings

  • C-c i r: calls igor-code-rewrite-region
  • C-c i w: calls igor-code-write-at-point
  • C-c i d: calls igor-do
  • C-c i x: calls igor-code-explain-region
  • C-c i q: calls igor-code-query-region

License

This software is licensed under the MIT License.

igor's People

Contributors

fitzgibbon avatar

Stargazers

 avatar

Watchers

 avatar  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.