{"id":19107924,"url":"https://github.com/haschka/cli-rag","last_synced_at":"2025-02-22T10:40:31.436Z","repository":{"id":250473521,"uuid":"834558305","full_name":"haschka/CLI-RAG","owner":"haschka","description":"Command line tool to Interact with a llama.cpp server. Also implements a basic vector database with cosine similarity search.","archived":false,"fork":false,"pushed_at":"2025-01-29T16:28:31.000Z","size":45,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T17:31:04.375Z","etag":null,"topics":["artificial-intelligence","cli","large-language-models","llama-cpp","llm","unix-shell"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haschka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-27T16:26:51.000Z","updated_at":"2025-01-29T16:28:34.000Z","dependencies_parsed_at":"2024-07-27T18:18:18.613Z","dependency_job_id":"6c46d69d-8721-4550-a2af-e406d3ab2951","html_url":"https://github.com/haschka/CLI-RAG","commit_stats":null,"previous_names":["haschka/cli-rag"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haschka%2FCLI-RAG","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haschka%2FCLI-RAG/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haschka%2FCLI-RAG/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haschka%2FCLI-RAG/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haschka","download_url":"https://codeload.github.com/haschka/CLI-RAG/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240163495,"owners_count":19758023,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","cli","large-language-models","llama-cpp","llm","unix-shell"],"created_at":"2024-11-09T04:14:26.389Z","updated_at":"2025-02-22T10:40:31.430Z","avatar_url":"https://github.com/haschka.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Command line client for llama.cpp\n\n### Video tutorial:\nhttps://www.youtube.com/watch?v=rsBnAF5ZLK8\n\n### Usage instructions:\n1. Requirements:\n   The tool requires the libraries and headers (-dev packages)\n   of curl, json-c and gnu readline. On debian based systems, i.e.\n   debian, ubuntu etc. an install of these can be achieved using:\n   ```\n   sudo apt-get install build-essential libjson-c-dev libcurl-dev libreadline-dev  \n   ```\n   Further you need a llama.cpp compatible large language and embedding model.\n   For the following instructins we suggest: \n\n   https://huggingface.co/lmstudio-community/Meta-Llama-3.1-8B-Instruct-GGUF\n\n   https://huggingface.co/nomic-ai/nomic-embed-text-v1.5-GGUF\n\n2. Build:\n   in most cases a simple `make all` should be enough.\n   In case it does not work edit the makefile in order to\n   satisfy your systems libraries cflags.\n\n3. Conversation Run:\n   \n   3.1 Start a llama.cpp server:\n      ```\n      llama.cpp/bin/llama-server -m Meta-Llama-3.1-8B-Instruct-Q6_K.gguf --host 127.0.0.1\n      ```\n   3.2 Connect to your llama.cpp server with the client:\n       ```\n       bin/rag-conversation 127.0.0.1 8080 -1\n       ```\n       When you type your text finish with `Ctrl-d`. This allows multiline input\n       on the terminal. \n\n4. Run with RAG:\n   \n   4.1 Start a llama.cpp server to generate embeddings:\n   ```\n   llama.cpp/bin/llama-server -m nomic-embed-text-v1.5.f16.gguf --host localhost --port 8081\n   ```\n   4.2 Create a vector database from a text document:\n   ```\n   bin/build-vector-db-from-server your-text.txt localhost 8081 2000 your-text.vdb\n   ```\n   4.3 Run vector database supported and talk about your text:\n   ```\n   bin/rag-with-vdb-cos-client localhost 8080 -1 your-text.vdb 3 localhost 8081\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaschka%2Fcli-rag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaschka%2Fcli-rag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaschka%2Fcli-rag/lists"}