fix: 🐛 check if llm is available for labeling request
This commit is contained in:
parent
a29752a3e5
commit
fa3d55cd1b
@ -131,7 +131,10 @@ function Organizrr() {
|
||||
const handleFileDrop = (files: FileWithPath[]) => {
|
||||
if (files.length < 1) return;
|
||||
|
||||
if (engine.current) {
|
||||
files.forEach((f) => {
|
||||
if (!engine.current) return;
|
||||
|
||||
const id = Math.random().toString(36).replace("0.", "doc_");
|
||||
const fileId = Math.random().toString(36).replace("0.", "file_");
|
||||
|
||||
@ -149,7 +152,7 @@ function Organizrr() {
|
||||
|
||||
setGeneratingFilenames((fns) => [...fns, fileId]);
|
||||
|
||||
engine.current?.chat.completions
|
||||
engine.current.chat.completions
|
||||
.create({
|
||||
messages,
|
||||
})
|
||||
@ -183,6 +186,7 @@ function Organizrr() {
|
||||
setGeneratingFilenames((fns) => fns.filter((fn) => fn !== fileId));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
setActiveFile(form.getValues().files.length - 1);
|
||||
setActiveDocumentId(
|
||||
|
Loading…
Reference in New Issue
Block a user