8000 GitHub - JazJas/GILT: GILT (Generation-based Information-support with LLM Technology) is a prototype in-IDE LLM information support tool. Its original version (https://github.com/namdy0429/GILT) only supports OpenAI and requires an OpenAI API key. It now supports local LLMs through Ollama.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ GILT Public
forked from namdy0429/GILT

GILT (Generation-based Information-support with LLM Technology) is a prototype in-IDE LLM information support tool. Its original version (https://github.com/namdy0429/GILT) only supports OpenAI and requires an OpenAI API key. It now supports local LLMs through Ollama.

Notifications You must be signed in to change notification settings

JazJas/GILT

 
 

Repository files navigation

GILT - Generation-based Information-support with LLM Technology

GILT (Generation-based Information-support with LLM Technology) is a prototype in-IDE LLM information support tool.

Its original version only supports OpenAI and requires an OpenAI API key, and is available in the VS Code Marketplace.

This fork now uses Ollama as its default engine, enabling support for local LLMs, with llama3.1:latest for chat and text completions, and codestral:22b-v0.1-q6_K for code completions.

overview

Build this extension

npm install

tsc

vsce package

Install this extension

code --install-extension ./gilt-1.0.0-beta.vsix

Requirements

To use GILT, you will need your own OpenAI API key, or local LLMs through Ollama.

Features

Prompt-less Trigger (Summary)

To trigger the tool, simply highlight a line of code and click on "AI Explanation" in the bottom blue bar or use the alt/option + a shortcut. On the left tab, you will find a summary description of the highlighted code. You can also trigger the tool by selecting the entire source code to see an overview of the entire source code.

Prompt-less Trigger (Buttons)

You can click any of the three buttons (API, Concept, Usage) below the summary description to further engage the tool as many times as needed:

  • The API button provides detailed explanations about the API calls used in the code.
  • The Concept button introduces domain-specific concepts that are relevant to understanding the highlighted code.
  • The Usage button offers code examples involving the API calls used in the highlighted code.

User Prompts

You have the option to ask the AI model questions directly using the input box. For example, you can ask questions like "Where do I perform addition?" and click the Ask button or press Enter. You can also inquire about specific parts of the code by highlighting them and asking questions.

Embed LLM-generated Information in Code

When you want to keep the information generated by the AI, simply use the Embed button. The AI-generated response will be added to the line before the highlighted code or before the cursor.

Probe the LLM

If you don't select any part of your code, you can ask follow-up questions to further interact with the LLM. If you don't need to ask a follow-up question, you can simply click the Clear All button or trigger the tool with new code context.

Collapse / Expand

You can collapse or expand previous information by clicking on the arrow icon next to the Embed button.

Update OpenAI API Key

To update your OpenAI API Key:

  1. Open the command palette with Ctrl/Cmd + Shift + p.
  2. Type Update OpenAI API Key.
  3. Enter your new API Key into the prompt.
  4. Reload the window.

To remove your OpenAI API Key:

  1. Open the command palette with Ctrl/Cmd + Shift + p.
  2. Type Update OpenAI API Key.
  3. Enter your API Key into the prompt.
  4. Reload the window.

Configurations

You can configure the LLM settings at Settings > Extensions > GILT (Ctrl/Cmd + ,).

Configurations that may be useful to adjust include:

  • To communicate with Ollama on a different port or host, set ollamaUrl to http://<ip>:<port>, replacing and with the appropriate values.
  • To use OpenAI as the LLM engine, set llmProvider to openai.
  • To use the GPT-4 model, set Chat Model to gpt-4.
  • The temperature controls how much randomness is in the output. The default value for GILT is 0.2. Use 0 to make it produce the same output every time you ask the same question or increase it for more creativity.
  • To allow GILT to incorporate longer context and prompts, increase Max Tokens.

Troubleshooting

If you encounter error messages from GPT API requests, please refer to this Error codes for detailed information.

Research Paper

To reference GILT in your research, please cite our upcoming ICSE'24 paper.

@inproceedings{nam2024gilt,
  title={Using an LLM to Help With Code Understanding}, 
  author={Daye Nam and Andrew Macvean and Vincent Hellendoorn and Bogdan Vasilescu and Brad Myers},
  booktitle={Proceedings of the 46th International Conference on Software Engineering (ICSE 2024)},
  year={2024}
}

About

GILT (Generation-based Information-support with LLM Technology) is a prototype in-IDE LLM information support tool. Its original version (https://github.com/namdy0429/GILT) only supports OpenAI and requires an OpenAI API key. It now supports local LLMs through Ollama.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 64.3%
  • JavaScript 31.9%
  • CSS 3.8%
0