diff --git a/README.md b/README.md index 1d9bc40494a89636d6f03bcd06a0272e04000c42..a45d500fa8e4e7dd8f7ababfa5703ad5a482d634 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,11 @@ This repository contains code snippets to get you started with our Large Languag ## Installation Each example comes with its own installation instructions, because there are examples with several languages and environments which makes this necessary. -## Usage -A base example is available in directory [base](base). +## Usage Examples -Further examples: - -- [summarize](summarize) shows how to use a LLM to summarize a (plain) text file +- [Base Example](base): This shows how to use LLM in python +- [Text Summarization](summarize): This example shows how to use a LLM to summarize a (plain) text file. +- [LLM with IDEs](text_editors): Using LLM services in integrated development environment (IDE) like Visual Studio Code and Pycharm. ## Support If you have the feeling that the examples contain errors or otherwise need improvement, please [check whether there is an open issues already](https://gitlab.hrz.tu-chemnitz.de/scads-ai-llm/scads-ai-llm-api-examples/-/issues). If there is no issue yet, create one. diff --git a/text_editors/README.md b/text_editors/README.md new file mode 100644 index 0000000000000000000000000000000000000000..86cc4c5117eeaa21ab1dd581d1739757d34ea4b5 --- /dev/null +++ b/text_editors/README.md @@ -0,0 +1,38 @@ +# Using Large Language Models in IDEs + +## Visual Studio Code +1. Download and install VSCode: https://code.visualstudio.com/ +2. Install the "Continue" PlugIn: https://www.continue.dev/ +3. Disable the "Telemetry" option in the plugin settings +4. Edit the `$HOME/.continue/config.json` as follows: + Add/edit: + ```json + "models": [ + { + "title": "ScaDS.AI LLM provider", + "provider": "openai", + "model": "meta-llama/Llama-3.3-70B-Instruct", + "contextLength": 8192, + "apiBase": "https://llm.scads.ai/v1", + "apiKey": "YOUR-API-KEY" + } + ], + ``` + and for tab auto completion, also add/edit: + ```json + "tabAutocompleteModel": { + "title": "ScaDS.AI LLM provider", + "provider": "openai", + "model": "mistral-7b-q4", + "contextLength": 8192, + "apiBase": "https://llm.scads.ai/v1", + "apiKey": "YOUR-API-KEY" + }, + ``` + Note - The config.json can also be edited from: Left Panel > "Continue" Plugin > Click on settings icon + +## PyCharm - Community Edition +1. Install PyCharm: Download and install PyCharm from [the website](https://www.jetbrains.com/pycharm/download/?section=linux) and follow the installation instructions for your OS. +2. Install "[Continue](https://plugins.jetbrains.com/plugin/22707-continue)" Plugin: Go to PyCharm's Settings > Plugins, search for "Continue" in the Marketplace, and click Install. +3. Edit Plugin Configuration: Click on plugin on right side bar > Click on "Open Continue Config" option. Add configuration mentioned above. Save the changes. +4. Restart PyCharm. \ No newline at end of file