Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mabuonomo/ollama-rag-nodejs
This is a simple example of how to use the Ollama RAG (retrieval augmented generation) using Ollama embeddings with nodejs, typescript, docker and chromadb
https://github.com/mabuonomo/ollama-rag-nodejs
chromadb docker embeddings ollama ollama-embeddings rag
Last synced: 12 days ago
JSON representation
This is a simple example of how to use the Ollama RAG (retrieval augmented generation) using Ollama embeddings with nodejs, typescript, docker and chromadb
- Host: GitHub
- URL: https://github.com/mabuonomo/ollama-rag-nodejs
- Owner: mabuonomo
- Created: 2024-08-17T13:50:58.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2024-10-06T13:33:08.000Z (about 1 month ago)
- Last Synced: 2024-10-11T18:42:09.461Z (about 1 month ago)
- Topics: chromadb, docker, embeddings, ollama, ollama-embeddings, rag
- Language: TypeScript
- Homepage:
- Size: 82 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ollama RAG NodeJS - fully dockerized -
## π₯ Overview
This is a simple example of how to use the Ollama RAG (retrieval augmented generation) using Ollama embeddings with nodejs, typescript, docker and [chromadb](https://docs.trychroma.com/).
It's a nodejs version of the [Ollama RAG example](https://ollama.com/blog/embedding-models) provided by Ollama.## π¨ Running the application
To run the application, you need to have docker installed on your machine. If you don't have docker installed, you can download it from [here](https://docs.docker.com/get-docker/).
After you have docker installed, you can run the following command to install the required packages and models:
```bash
make setup # Setup the application
make ollama_pull # Pull the models
```After the models are pulled and packages are installated, you can run the application with the following command:
```bash
make run # execute the application
```Output:
```bash
Prompt: What animals are llamas related to?
Response: {
model: 'llama3.2',
created_at: '2024-10-06T13:30:47.825643583Z',
message: {
role: 'assistant',
content: 'Based on the information provided, it is stated that llamas are part of the camelid family. This means they share a close genetic relationship with other animals within this family. Specifically, llamas are closely related to:\n' +
'\n' +
'1. VicuΓ±as\n' +
'2. Camels (although not as closely related to domesticated camels)'
},
done_reason: 'stop',
done: true,
total_duration: 7936475467,
load_duration: 36586649,
prompt_eval_count: 66,
prompt_eval_duration: 136286000,
eval_count: 67,
eval_duration: 7720279000
```## π References
*
*
*
* (coming soon at the time of writing)