mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-04 06:54:28 +00:00
refactor(ai): initialize GoogleGenAI with process.env.GEMINI_API_KEY directly for embedding
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user