refactor(ai): initialize GoogleGenAI with process.env.GEMINI_API_KEY directly for embedding

This commit is contained in:
yiling
2026-05-28 15:21:44 +08:00
parent 6bce76cf0a
commit f1963e7bb9
3 changed files with 4 additions and 16 deletions
-11
View File
@@ -474,20 +474,9 @@ export async function getEmbeddingContextActivity(params: GetEmbeddingContextPar
throw ApplicationFailure.create({ message: 'asset has no media type', nonRetryable: true })
}
const dbProvider = await prisma.provider.findFirst({
where: { teamId: params.teamId, name: 'google' },
})
if (!dbProvider) {
throw ApplicationFailure.create({
message: 'Google provider not found in database',
nonRetryable: true,
})
}
return {
agent,
asset,
dbProvider,
}
}