From a62612c2f0a300d4f36096b80abd352e1751546d Mon Sep 17 00:00:00 2001 From: Hk-Gosuto Date: Fri, 7 Feb 2025 14:35:00 +0800 Subject: [PATCH] fix: #336 --- .env.template | 21 +++++++++++++++------ app/components/chat.tsx | 30 ++++++++++++++++++++++++++++-- 2 files changed, 43 insertions(+), 8 deletions(-) diff --git a/.env.template b/.env.template index 0187e1cdd12..74dc64bd9aa 100644 --- a/.env.template +++ b/.env.template @@ -54,20 +54,29 @@ NEXT_PUBLIC_ENABLE_NODEJS_PLUGIN=1 # (optional) # Default: Empty # If you want to enable RAG, set this value to 1. +# ref: https://github.com/Hk-Gosuto/ChatGPT-Next-Web-LangChain/blob/main/docs/rag-cn.md ENABLE_RAG= # (optional) # Default: Empty -# Model used when RAG vectorized data. -RAG_EMBEDDING_MODEL=text-embedding-ada-002 +# ref: https://github.com/Hk-Gosuto/ChatGPT-Next-Web-LangChain/blob/main/docs/rag-cn.md +SUPABASE_URL= -# Configuration is required when turning on RAG. +# (optional) # Default: Empty -QDRANT_URL= +# ref: https://github.com/Hk-Gosuto/ChatGPT-Next-Web-LangChain/blob/main/docs/rag-cn.md +SUPABASE_PRIVATE_KEY= -# Configuration is required when turning on RAG. +# (optional) +# Default: Empty +# Model used when RAG vectorized data. +# ref: https://github.com/Hk-Gosuto/ChatGPT-Next-Web-LangChain/blob/main/docs/rag-cn.md +RAG_EMBEDDING_MODEL=text-embedding-ada-002 + +# (optional) # Default: Empty -QDRANT_API_KEY= +# ref: https://github.com/Hk-Gosuto/ChatGPT-Next-Web-LangChain/blob/main/docs/rag-cn.md +OLLAMA_BASE_URL= # (optional) # Default: Empty diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 8697c00ba38..f6e4843bf37 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -1186,7 +1186,7 @@ function _Chat() { } setIsLoading(true); chatStore - .onUserInput(userInput, attachImages) + .onUserInput(userInput, attachImages, attachFiles) .then(() => setIsLoading(false)); setAttachImages([]); setAttachFiles([]); @@ -2192,7 +2192,7 @@ function _Chat() {