fix: #336
This commit is contained in:
parent
3f153fe8bd
commit
a62612c2f0
|
@ -54,20 +54,29 @@ NEXT_PUBLIC_ENABLE_NODEJS_PLUGIN=1
|
||||||
# (optional)
|
# (optional)
|
||||||
# Default: Empty
|
# Default: Empty
|
||||||
# If you want to enable RAG, set this value to 1.
|
# 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=
|
ENABLE_RAG=
|
||||||
|
|
||||||
|
# (optional)
|
||||||
|
# Default: Empty
|
||||||
|
# ref: https://github.com/Hk-Gosuto/ChatGPT-Next-Web-LangChain/blob/main/docs/rag-cn.md
|
||||||
|
SUPABASE_URL=
|
||||||
|
|
||||||
|
# (optional)
|
||||||
|
# Default: Empty
|
||||||
|
# ref: https://github.com/Hk-Gosuto/ChatGPT-Next-Web-LangChain/blob/main/docs/rag-cn.md
|
||||||
|
SUPABASE_PRIVATE_KEY=
|
||||||
|
|
||||||
# (optional)
|
# (optional)
|
||||||
# Default: Empty
|
# Default: Empty
|
||||||
# Model used when RAG vectorized data.
|
# 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
|
RAG_EMBEDDING_MODEL=text-embedding-ada-002
|
||||||
|
|
||||||
# Configuration is required when turning on RAG.
|
# (optional)
|
||||||
# Default: Empty
|
# Default: Empty
|
||||||
QDRANT_URL=
|
# ref: https://github.com/Hk-Gosuto/ChatGPT-Next-Web-LangChain/blob/main/docs/rag-cn.md
|
||||||
|
OLLAMA_BASE_URL=
|
||||||
# Configuration is required when turning on RAG.
|
|
||||||
# Default: Empty
|
|
||||||
QDRANT_API_KEY=
|
|
||||||
|
|
||||||
# (optional)
|
# (optional)
|
||||||
# Default: Empty
|
# Default: Empty
|
||||||
|
|
|
@ -1186,7 +1186,7 @@ function _Chat() {
|
||||||
}
|
}
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
chatStore
|
chatStore
|
||||||
.onUserInput(userInput, attachImages)
|
.onUserInput(userInput, attachImages, attachFiles)
|
||||||
.then(() => setIsLoading(false));
|
.then(() => setIsLoading(false));
|
||||||
setAttachImages([]);
|
setAttachImages([]);
|
||||||
setAttachFiles([]);
|
setAttachFiles([]);
|
||||||
|
@ -2192,7 +2192,7 @@ function _Chat() {
|
||||||
<label
|
<label
|
||||||
className={clsx(styles["chat-input-panel-inner"], {
|
className={clsx(styles["chat-input-panel-inner"], {
|
||||||
[styles["chat-input-panel-inner-attach"]]:
|
[styles["chat-input-panel-inner-attach"]]:
|
||||||
attachImages.length !== 0,
|
attachImages.length !== 0 || attachFiles.length != 0,
|
||||||
})}
|
})}
|
||||||
htmlFor="chat-input"
|
htmlFor="chat-input"
|
||||||
>
|
>
|
||||||
|
@ -2237,6 +2237,32 @@ function _Chat() {
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
{attachFiles.length != 0 && (
|
||||||
|
<div className={styles["attach-files"]}>
|
||||||
|
{attachFiles.map((file, index) => {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
key={index}
|
||||||
|
className={styles["attach-file"]}
|
||||||
|
title={file.originalFilename}
|
||||||
|
>
|
||||||
|
<div className={styles["attach-file-info"]}>
|
||||||
|
{file.originalFilename}
|
||||||
|
</div>
|
||||||
|
<div className={styles["attach-file-mask"]}>
|
||||||
|
<DeleteFileButton
|
||||||
|
deleteFile={() => {
|
||||||
|
setAttachFiles(
|
||||||
|
attachFiles.filter((_, i) => i !== index),
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<IconButton
|
<IconButton
|
||||||
icon={<SendWhiteIcon />}
|
icon={<SendWhiteIcon />}
|
||||||
text={Locale.Chat.Send}
|
text={Locale.Chat.Send}
|
||||||
|
|
Loading…
Reference in New Issue