From abee4c7ecb7be0a8f3fd61de60dc076c2d4c5ff3 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 11 Mar 2025 22:37:40 +0100 Subject: [PATCH 1/3] [#STEP-1-Generator] [#STEP-1-Generator](https://bitcrowd.dev/a-rag-library-for-elixir) From 496d86674a05eaac254b9e28a567f2f2d30cd4c9 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 12 Mar 2025 08:38:55 +0100 Subject: [PATCH 2/3] [#STEP-2-Custoisations] [#STEP-2-Custoisations](https://bitcrowd.dev/a-rag-library-for-elixir) From 64937d0908acb5aae2cbe31177147f0cbcbb36f9 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 12 Mar 2025 09:40:48 +0100 Subject: [PATCH 3/3] took out nx serving for text generation --- lib/chatbot/application.ex | 6 ------ lib/chatbot/rag.ex | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/chatbot/application.ex b/lib/chatbot/application.ex index 6eaa18e..834fb07 100644 --- a/lib/chatbot/application.ex +++ b/lib/chatbot/application.ex @@ -8,12 +8,6 @@ defmodule Chatbot.Application do @impl true def start(_type, _args) do children = [ - {Nx.Serving, - [ - serving: Chatbot.Rag.Serving.build_llm_serving(), - name: Rag.LLMServing, - batch_timeout: 100 - ]}, {Nx.Serving, [ serving: Chatbot.Rag.Serving.build_embedding_serving(), diff --git a/lib/chatbot/rag.ex b/lib/chatbot/rag.ex index 745516d..3b2602e 100644 --- a/lib/chatbot/rag.ex +++ b/lib/chatbot/rag.ex @@ -5,7 +5,7 @@ defmodule Chatbot.Rag do import Ecto.Query import Pgvector.Ecto.Query - @provider Ai.Nx.new(%{embeddings_serving: Rag.EmbeddingServing, text_serving: Rag.LLMServing}) + @provider Ai.Nx.new(%{embeddings_serving: Rag.EmbeddingServing}) def ingest(path) do path