This commit is contained in:
parent
a1a251f2fe
commit
ad5fb2fa7b
|
|
@ -89,7 +89,7 @@ export const createFile = async (
|
||||||
file: File,
|
file: File,
|
||||||
fileRecord: TablesInsert<"files">,
|
fileRecord: TablesInsert<"files">,
|
||||||
workspace_id: string,
|
workspace_id: string,
|
||||||
embeddingsProvider: "openai" | "local"
|
embeddingsProvider: "openai" | "local" | "bge-m3"
|
||||||
) => {
|
) => {
|
||||||
let validFilename = fileRecord.name.replace(/[^a-z0-9.]/gi, "_").toLowerCase()
|
let validFilename = fileRecord.name.replace(/[^a-z0-9.]/gi, "_").toLowerCase()
|
||||||
const extension = file.name.split(".").pop()
|
const extension = file.name.split(".").pop()
|
||||||
|
|
@ -159,7 +159,7 @@ export const createDocXFile = async (
|
||||||
file: File,
|
file: File,
|
||||||
fileRecord: TablesInsert<"files">,
|
fileRecord: TablesInsert<"files">,
|
||||||
workspace_id: string,
|
workspace_id: string,
|
||||||
embeddingsProvider: "openai" | "local"
|
embeddingsProvider: "openai" | "local" | "bge-m3"
|
||||||
) => {
|
) => {
|
||||||
const { data: createdFile, error } = await supabase
|
const { data: createdFile, error } = await supabase
|
||||||
.from("files")
|
.from("files")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue