Add image index and pdf parse (#3956)

* feat: think tag parse

* feat: parse think tag test

* feat: pdf parse ux

* feat: doc2x parse

* perf: rewrite training mode setting

* feat: image parse queue

* perf: image index

* feat: image parse process

* feat: add init sh

* fix: ts
This commit is contained in:
Archer
2025-03-03 23:08:29 +08:00
committed by archer
parent 08b6f594df
commit adf5377ebe
106 changed files with 2337 additions and 1454 deletions

View File

@@ -127,12 +127,12 @@ export const pushGenerateVectorUsage = ({
createUsage({
teamId,
tmbId,
appName: i18nT('common:support.wallet.moduleName.index'),
appName: i18nT('account_usage:embedding_index'),
totalPoints,
source,
list: [
{
moduleName: i18nT('common:support.wallet.moduleName.index'),
moduleName: i18nT('account_usage:embedding_index'),
amount: totalVector,
model: vectorModelName,
inputTokens
@@ -203,7 +203,7 @@ export const pushQuestionGuideUsage = ({
});
};
export function pushAudioSpeechUsage({
export const pushAudioSpeechUsage = ({
appName = i18nT('common:support.wallet.usage.Audio Speech'),
model,
charsLength,
@@ -217,7 +217,7 @@ export function pushAudioSpeechUsage({
teamId: string;
tmbId: string;
source: UsageSourceEnum;
}) {
}) => {
const { totalPoints, modelName } = formatModelChars2Points({
model,
inputTokens: charsLength,
@@ -239,9 +239,9 @@ export function pushAudioSpeechUsage({
}
]
});
}
};
export function pushWhisperUsage({
export const pushWhisperUsage = ({
teamId,
tmbId,
duration
@@ -249,7 +249,7 @@ export function pushWhisperUsage({
teamId: string;
tmbId: string;
duration: number;
}) {
}) => {
const whisperModel = getDefaultTTSModel();
if (!whisperModel) return;
@@ -278,4 +278,4 @@ export function pushWhisperUsage({
}
]
});
}
};