This commit is contained in:
parent
467884c0df
commit
b7498e3bb2
|
|
@ -7,6 +7,9 @@ import OpenAI from "openai"
|
|||
import { getRuntimeEnv } from "@/lib/ipconfig" // 新增引入
|
||||
|
||||
export async function POST(request: Request) {
|
||||
|
||||
console.log("......[retrieve] request=", request)
|
||||
|
||||
const json = await request.json()
|
||||
const { userInput, fileIds, embeddingsProvider, sourceCount } = json as {
|
||||
userInput: string
|
||||
|
|
@ -88,6 +91,7 @@ export async function POST(request: Request) {
|
|||
} else if (embeddingsProvider === "bge-m3"){
|
||||
// 示例:调用你自己的 BGE-M3 API 或本地函数
|
||||
// 新增:使用 BGE-M3 嵌入
|
||||
console.log("......[retrieve] userInput=",userInput)
|
||||
const bgeEmbedding = await generateBgeM3Embedding(userInput)
|
||||
|
||||
// 调用对应的 RPC,需要在数据库侧提前定义 match_file_items_bge_m3
|
||||
|
|
|
|||
Loading…
Reference in New Issue