fix: #336
This commit is contained in:
parent
3f153fe8bd
commit
a62612c2f0
|
@ -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
|
||||
# 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)
|
||||
# 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
|
||||
|
||||
# Configuration is required when turning on RAG.
|
||||
# (optional)
|
||||
# Default: Empty
|
||||
QDRANT_URL=
|
||||
|
||||
# Configuration is required when turning on RAG.
|
||||
# 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
|
||||
|
|
|
@ -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() {
|
|||
<label
|
||||
className={clsx(styles["chat-input-panel-inner"], {
|
||||
[styles["chat-input-panel-inner-attach"]]:
|
||||
attachImages.length !== 0,
|
||||
attachImages.length !== 0 || attachFiles.length != 0,
|
||||
})}
|
||||
htmlFor="chat-input"
|
||||
>
|
||||
|
@ -2237,6 +2237,32 @@ function _Chat() {
|
|||
})}
|
||||
</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
|
||||
icon={<SendWhiteIcon />}
|
||||
text={Locale.Chat.Send}
|
||||
|
|
Loading…
Reference in New Issue