feat: remove all ai transcription related code and schema

This commit is contained in:
yiling
2026-05-28 14:23:02 +08:00
parent 721a9c13d7
commit 5173bb2a01
25 changed files with 38 additions and 281 deletions
+2 -2
View File
@@ -25,7 +25,7 @@ export class AgentService {
skills,
} = params
if (type === 'embedding' || type === 'transcription' || type === 'autofill') {
if (type === 'embedding' || type === 'autofill') {
const existing = await this.prismaClient.agent.findFirst({
where: {
type,
@@ -129,7 +129,7 @@ export class AgentService {
if (!agent) throw new Error('agent not found')
if (type === 'embedding' || type === 'transcription' || type === 'autofill') {
if (type === 'embedding' || type === 'autofill') {
const existing = await this.prismaClient.agent.findFirst({
where: {
type,
-9
View File
@@ -24,15 +24,6 @@ export class ElevenLabsProvider implements Provider {
}
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async transcribe(model: string, _audioBuffer: Buffer): Promise<{ text: string; usage: Usage }> {
// TODO: Implement ElevenLabs transcribe
return {
text: 'elevenlabs transcription',
usage: { model, inputTokens: 0, outputTokens: 0 },
}
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async generateImageEmbedding(_model: string, _imageBuffer: Buffer): Promise<number[]> {
throw new Error('Not implemented')
-9
View File
@@ -67,15 +67,6 @@ export class GeminiProvider implements Provider {
return { text: result.text || '', usage }
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async transcribe(model: string, _audioBuffer: Buffer): Promise<{ text: string; usage: Usage }> {
// TODO: Implement Gemini transcribe
return {
text: 'gemini transcription',
usage: { model, inputTokens: 0, outputTokens: 0 },
}
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async generateImageEmbedding(_model: string, _imageBuffer: Buffer): Promise<number[]> {
throw new Error('Not implemented')
-9
View File
@@ -76,15 +76,6 @@ export class OpenAiProvider implements Provider {
return { text: chat.choices[0].message.content || '', usage }
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async transcribe(model: string, _audioBuffer: Buffer): Promise<{ text: string; usage: Usage }> {
// TODO: Implement OpenAI transcribe
return {
text: 'openai transcription',
usage: { model, inputTokens: 0, outputTokens: 0 },
}
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async generateImageEmbedding(_model: string, _imageBuffer: Buffer): Promise<number[]> {
throw new Error('Not implemented')
-2
View File
@@ -13,8 +13,6 @@ export interface Provider {
schema?: any,
): Promise<{ text: string; usage: Usage }>
transcribe(model: string, audioBuffer: Buffer): Promise<{ text: string; usage: Usage }>
generateImageEmbedding(model: string, imageBuffer: Buffer): Promise<number[]>
generateVideoEmbedding(model: string, videoBuffer: Buffer): Promise<number[]>
-24
View File
@@ -262,30 +262,6 @@ export class UploadService {
})
}
const transcriptionAgent = await tx.agent.findFirst({
where: {
type: 'transcription',
enabled: true,
user: { teamMembers: { some: { teamId: team.id } } },
},
})
if (transcriptionAgent) {
await tx.workflowTask.create({
data: {
assetId: asset.id,
type: WorkflowTaskType.ai_transcription,
status: WorkflowTaskStatus.pending,
teamId: team.id,
projectId: asset.projectId,
payload: {
projectId: asset.projectId!,
agent: { agentId: transcriptionAgent.id },
},
},
})
}
// Ai Embedding if enabled via agent
const embeddingAgent = await tx.agent.findFirst({
where: {