mirror of
https://github.com/open-webui/open-webui
synced 2025-06-25 17:57:20 +00:00
Feature: adjusted createNewKnowledge to pass individual rag config
This commit is contained in:
parent
4f93577d3d
commit
6e2155dd8c
@ -4,7 +4,8 @@ export const createNewKnowledge = async (
|
|||||||
token: string,
|
token: string,
|
||||||
name: string,
|
name: string,
|
||||||
description: string,
|
description: string,
|
||||||
accessControl: null | object
|
accessControl: null | object,
|
||||||
|
rag_config: null | object
|
||||||
) => {
|
) => {
|
||||||
let error = null;
|
let error = null;
|
||||||
|
|
||||||
@ -16,9 +17,10 @@ export const createNewKnowledge = async (
|
|||||||
authorization: `Bearer ${token}`
|
authorization: `Bearer ${token}`
|
||||||
},
|
},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
name: name,
|
form_data: {name: name,
|
||||||
description: description,
|
description: description,
|
||||||
access_control: accessControl
|
access_control: accessControl},
|
||||||
|
rag_data: rag_config
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user