[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-71171":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},71171,"genai-stack","docker\u002Fgenai-stack","docker","Langchain + Docker + Neo4j + Ollama","",null,"Python",5332,1218,76,61,0,1,12,31,3,76.36,"Creative Commons Zero v1.0 Universal",false,"main",[],"2026-06-12 04:00:59","# GenAI Stack\nThe GenAI Stack will get you started building your own GenAI application in no time.\nThe demo applications can serve as inspiration or as a starting point.\nLearn more about the details in the [introduction blog post](https:\u002F\u002Fneo4j.com\u002Fblog\u002Fintroducing-genai-stack-developers\u002F).\n\n# Configure\n\nCreate a `.env` file from the environment template file `env.example`\n\nAvailable variables:\n| Variable Name          | Default value                      | Description                                                             |\n|------------------------|------------------------------------|-------------------------------------------------------------------------|\n| OLLAMA_BASE_URL        | http:\u002F\u002Fhost.docker.internal:11434  | REQUIRED - URL to Ollama LLM API                                        |   \n| NEO4J_URI              | neo4j:\u002F\u002Fdatabase:7687              | REQUIRED - URL to Neo4j database                                        |\n| NEO4J_USERNAME         | neo4j                              | REQUIRED - Username for Neo4j database                                  |\n| NEO4J_PASSWORD         | password                           | REQUIRED - Password for Neo4j database                                  |\n| LLM                    | llama2                             | REQUIRED - Can be any Ollama model tag, or gpt-4 or gpt-3.5 or claudev2 |\n| EMBEDDING_MODEL        | sentence_transformer               | REQUIRED - Can be sentence_transformer, openai, aws, ollama or google-genai-embedding-001|\n| AWS_ACCESS_KEY_ID      |                                    | REQUIRED - Only if LLM=claudev2 or embedding_model=aws                  |\n| AWS_SECRET_ACCESS_KEY  |                                    | REQUIRED - Only if LLM=claudev2 or embedding_model=aws                  |\n| AWS_DEFAULT_REGION     |                                    | REQUIRED - Only if LLM=claudev2 or embedding_model=aws                  |\n| OPENAI_API_KEY         |                                    | REQUIRED - Only if LLM=gpt-4 or LLM=gpt-3.5 or embedding_model=openai   |\n| GOOGLE_API_KEY         |                                    | REQUIRED - Only required when using GoogleGenai LLM or embedding model google-genai-embedding-001|\n| LANGCHAIN_ENDPOINT     | \"https:\u002F\u002Fapi.smith.langchain.com\"  | OPTIONAL - URL to Langchain Smith API                                   |\n| LANGCHAIN_TRACING_V2   | false                              | OPTIONAL - Enable Langchain tracing v2                                  |\n| LANGCHAIN_PROJECT      |                                    | OPTIONAL - Langchain project name                                       |\n| LANGCHAIN_API_KEY      |                                    | OPTIONAL - Langchain API key                                            |\n\n## LLM Configuration\nMacOS and Linux users can use any LLM that's available via Ollama. Check the \"tags\" section under the model page you want to use on https:\u002F\u002Follama.ai\u002Flibrary and write the tag for the value of the environment variable `LLM=` in the `.env` file.\nAll platforms can use GPT-3.5-turbo and GPT-4 (bring your own API keys for OpenAI models).\n\n**MacOS**\nInstall [Ollama](https:\u002F\u002Follama.ai) on MacOS and start it before running `docker compose up` using `ollama serve` in a separate terminal.\n\n**Linux**\nNo need to install Ollama manually, it will run in a container as\npart of the stack when running with the Linux profile: run `docker compose --profile linux up`.\nMake sure to set the `OLLAMA_BASE_URL=http:\u002F\u002Fllm:11434` in the `.env` file when using Ollama docker container.\n\nTo use the Linux-GPU profile: run `docker compose --profile linux-gpu up`. Also change `OLLAMA_BASE_URL=http:\u002F\u002Fllm-gpu:11434` in the `.env` file.\n\n**Windows**\nOllama now supports Windows. Install [Ollama](https:\u002F\u002Follama.ai) on Windows and start it before running `docker compose up` using `ollama serve` in a separate terminal. Alternatively, Windows users can generate an OpenAI API key and configure the stack to use `gpt-3.5` or `gpt-4` in the `.env` file.\n# Develop\n\n> [!WARNING]\n> There is a performance issue that impacts python applications in the `4.24.x` releases of Docker Desktop. Please upgrade to the latest release before using this stack.\n\n**To start everything**\n```\ndocker compose up\n```\nIf changes to build scripts have been made, **rebuild**.\n```\ndocker compose up --build\n```\n\nTo enter **watch mode** (auto rebuild on file changes).\nFirst start everything, then in new terminal:\n```\ndocker compose watch\n```\n\n**Shutdown**\nIf health check fails or containers don't start up as expected, shutdown\ncompletely to start up again.\n```\ndocker compose down\n```\n\n# Applications\n\nHere's what's in this repo:\n\n| Name | Main files | Compose name | URLs | Description |\n|---|---|---|---|---|\n| Support Bot | `bot.py` | `bot` | http:\u002F\u002Flocalhost:8501 | Main usecase. Fullstack Python application. |\n| Stack Overflow Loader | `loader.py` | `loader` | http:\u002F\u002Flocalhost:8502 | Load SO data into the database (create vector embeddings etc). Fullstack Python application. |\n| PDF Reader | `pdf_bot.py` | `pdf_bot` | http:\u002F\u002Flocalhost:8503 | Read local PDF and ask it questions. Fullstack Python application. |\n| Standalone Bot API | `api.py` | `api` | http:\u002F\u002Flocalhost:8504 | Standalone HTTP API streaming (SSE) + non-streaming endpoints Python. |\n| Standalone Bot UI | `front-end\u002F` | `front-end` | http:\u002F\u002Flocalhost:8505 | Standalone client that uses the Standalone Bot API to interact with the model. JavaScript (Svelte) front-end. |\n\nThe database can be explored at http:\u002F\u002Flocalhost:7474.\n\n## App 1 - Support Agent Bot\n\nUI: http:\u002F\u002Flocalhost:8501\nDB client: http:\u002F\u002Flocalhost:7474\n\n- answer support question based on recent entries\n- provide summarized answers with sources\n- demonstrate difference between\n    - RAG Disabled (pure LLM response)\n    - RAG Enabled (vector + knowledge graph context)\n- allow to generate a high quality support ticket for the current conversation based on the style of highly rated questions in the database.\n\n![](.github\u002Fmedia\u002Fapp1-rag-selector.png)\n*(Chat input + RAG mode selector)*\n\n|  |  |\n|---|---|\n| ![](.github\u002Fmedia\u002Fapp1-generate.png) | ![](.github\u002Fmedia\u002Fapp1-ticket.png) |\n| *(CTA to auto generate support ticket draft)* | *(UI of the auto generated support ticket draft)* |\n\n---\n\n##  App 2 - Loader\n\nUI: http:\u002F\u002Flocalhost:8502\nDB client: http:\u002F\u002Flocalhost:7474\n\n- import recent Stack Overflow data for certain tags into a KG\n- embed questions and answers and store them in vector index\n- UI: choose tags, run import, see progress, some stats of data in the database\n- Load high ranked questions (regardless of tags) to support the ticket generation feature of App 1.\n\n\n\n\n|  |  |\n|---|---|\n| ![](.github\u002Fmedia\u002Fapp2-ui-1.png) | ![](.github\u002Fmedia\u002Fapp2-model.png) |\n\n## App 3 Question \u002F Answer with a local PDF\nUI: http:\u002F\u002Flocalhost:8503  \nDB client: http:\u002F\u002Flocalhost:7474\n\nThis application lets you load a local PDF into text\nchunks and embed it into Neo4j so you can ask questions about\nits contents and have the LLM answer them using vector similarity\nsearch.\n\n![](.github\u002Fmedia\u002Fapp3-ui.png)\n\n## App 4 Standalone HTTP API\nEndpoints: \n  - http:\u002F\u002Flocalhost:8504\u002Fquery?text=hello&rag=false (non streaming)\n  - http:\u002F\u002Flocalhost:8504\u002Fquery-stream?text=hello&rag=false (SSE streaming)\n\nExample cURL command:\n```bash\ncurl http:\u002F\u002Flocalhost:8504\u002Fquery-stream\\?text\\=minimal%20hello%20world%20in%20python\\&rag\\=false\n```\n\nExposes the functionality to answer questions in the same way as App 1 above. Uses\nsame code and prompts.\n\n## App 5 Static front-end\nUI: http:\u002F\u002Flocalhost:8505\n\nThis application has the same features as App 1, but is built separate from\nthe back-end code using modern best practices (Vite, Svelte, Tailwind).  \nThe auto-reload on changes are instant using the Docker watch `sync` config.  \n![](.github\u002Fmedia\u002Fapp5-ui.png)\n","GenAI Stack 是一个用于快速构建生成式AI应用程序的开发框架。它结合了Langchain、Docker、Neo4j和Ollama等技术，支持多种语言模型（如Llama2、GPT-4等）与嵌入模型的选择配置，并通过环境变量进行灵活设置。项目特别适合需要利用图数据库进行知识管理或复杂关系分析的应用场景，例如智能客服系统、个性化推荐引擎或是基于内容的搜索服务。其易于部署的特点使得开发者能够迅速搭建起原型并进行迭代优化。",2,"2026-06-11 03:36:25","high_star"]