perf: model test;perf: sidebar trigger (#4127)

* fix: import dataset step error;perf: ai proxy avatar (#4074)

* perf: pg config params

* perf: ai proxy avatar

* fix: import dataset step error

* feat: data input ux

* perf: app dataset rewite

* perf: model test

* perf: sidebar trigger

* lock

* update nanoid version

* fix: select component ux

* fix: ts

* fix: vitest

* remove test
This commit is contained in:
Archer
2025-03-12 21:11:43 +08:00
committed by archer
parent c131c2a7dc
commit f71ab0caeb
64 changed files with 438 additions and 1356 deletions

View File

@@ -76,6 +76,10 @@ export const createChatCompletion = async ({
timeout: formatTimeout
});
addLog.debug(`Start create chat completion`, {
model: body.model
});
const response = await ai.chat.completions.create(body, {
...options,
...(modelConstantsData.requestUrl ? { path: modelConstantsData.requestUrl } : {}),

View File

@@ -36,14 +36,12 @@ export async function getVectorsByText({ model, input, type, headers }: GetVecto
model.requestUrl
? {
path: model.requestUrl,
headers: model.requestAuth
? {
Authorization: `Bearer ${model.requestAuth}`,
...headers
}
: headers
headers: {
...(model.requestAuth ? { Authorization: `Bearer ${model.requestAuth}` } : {}),
...headers
}
}
: {}
: { headers }
)
.then(async (res) => {
if (!res.data) {

View File

@@ -61,7 +61,6 @@ export async function rewriteAppWorkflowToDetail({
teamId: isRoot ? undefined : teamId,
datasetIdList: Array.from(datasetIdSet)
});
const datasetMap = new Map(datasetList.map((ds) => [String(ds.datasetId), ds]));
// Rewrite dataset ids, add dataset info to nodes