Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zatevakhin/obsidian-local-llm
Obsidian Local LLM is a plugin for Obsidian that provides access to a powerful neural network, allowing users to generate text in a wide range of styles and formats using a local LLM.
https://github.com/zatevakhin/obsidian-local-llm
ggml llama llamacpp obsidian-md obsidian-plugin
Last synced: about 1 month ago
JSON representation
Obsidian Local LLM is a plugin for Obsidian that provides access to a powerful neural network, allowing users to generate text in a wide range of styles and formats using a local LLM.
- Host: GitHub
- URL: https://github.com/zatevakhin/obsidian-local-llm
- Owner: zatevakhin
- License: mit
- Created: 2023-04-30T16:39:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-02T14:34:51.000Z (over 1 year ago)
- Last Synced: 2024-09-30T22:04:00.887Z (about 1 month ago)
- Topics: ggml, llama, llamacpp, obsidian-md, obsidian-plugin
- Language: TypeScript
- Homepage:
- Size: 653 KB
- Stars: 126
- Watchers: 4
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Obsidian Local LLM Plugin
Obsidian Local LLM is a plugin for Obsidian that provides access to a powerful neural network, allowing users to generate text in a wide range of styles and formats using a local LLM from the LLAMA family.
The plugin allows users to input a prompt as a canvas block and receive answers in the new block. The LLM can be configured to use a variety of models and settings, allowing users to customize the output to their specific needs.
![image](https://user-images.githubusercontent.com/12279112/235395999-40b9c136-5962-4fc9-9273-4657b1e8c3bf.png)
See [gallery](https://github.com/zatevakhin/obsidian-local-llm#gallery) below.
## Dependencies
The plugin uses a [server](https://github.com/abetlen/llama-cpp-python/blob/main/llama_cpp/server/__main__.py) from [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) as the API backend, which relies on the [llama.cpp](https://github.com/ggerganov/llama.cpp) library. The plugin also requires Python 3.7 or later and the pip package manager to be installed on your system.To install llama-cpp-python and its dependencies, run the following command:
```bash
pip install llama-cpp-python[server]
```
### Large Language Models
Folow the [link to the repository](https://github.com/underlines/awesome-marketing-datascience/blob/master/awesome-ai.md), click 'Show Table with models' and choose the model which is suitable for you and in the '[ggml](https://github.com/ggerganov/ggml)' format.## Install plugin
For now, is available two ways how to install the plugin### Install using [BRAT](https://github.com/TfTHacker/obsidian42-brat)
1. Install BRAT trough Community Plugins
2. Open BRAT settings
3. Click 'Add Beta plugin'
4. Insert link to repository
5. Click 'Add Plugin'
5. Enable 'Obsidian Local LLM' plugin in Community Plugins### Install from sources
1. Clone repository `git clone https://github.com/zatevakhin/obsidian-local-llm`
2. Change directory `cd obsidian-local-llm`
3. Install dependencies `npm install`
4. Build plugin `npm build`
5. Create `obsidian-local-llm` directory in your vault `$HOME/MyObsidian/.obsidian/plugins`
6. Move `main.js`, `manifest.json`, and `styles.css` into that directory
7. Open Obsidian **>** Settings **>** Community Plugins **>** Toggle **Obsidian Local LLM**## Usage
To use the plugin, follow these steps:1. Open a terminal
2. Set environment variable with the [ggml](https://github.com/ggerganov/ggml) model path example: `export MODEL=/.../ggml-model-name.bin`
2. Run the API server using the command `python3 -m llama_cpp.server`
3. Don't close the terminal until you want to use the plugin
1. Open a canvas in Obsidian
2. Create a new block
3. Type in a prompt text
4. Use Right-click on the block to open a context menu
5. Click on the "LLM Instruction" option
6. Wait for the generated text to appear in the new block## Gallery
https://user-images.githubusercontent.com/12279112/235378564-cc962e85-12d9-4f8a-9b9d-415632d39c53.mp4
[obsidian-local-llm-canvas-typewriter.webm](https://user-images.githubusercontent.com/12279112/235395542-ee4009ef-9b8d-4944-8c49-08bda95e5988.webm)
![image](https://user-images.githubusercontent.com/12279112/235440109-9c62e3ee-b79f-4a37-b8a3-94e3334e37b1.png)
## Contributing
Contributions to the plugin are welcome! If you would like to contribute, please fork the repository and submit a pull request.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.