mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-26 05:50:32 +00:00
feat(search): add semantic search with embeddings and search mode toggle
This commit is contained in:
@@ -185,7 +185,15 @@ export class TeamService {
|
||||
where: { id: teamId },
|
||||
})
|
||||
if (!team) throw new Error('team not found')
|
||||
return team.settings || {}
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const settings = (team.settings || {}) as any
|
||||
|
||||
const embeddingAgent = await prisma.agent.findFirst({
|
||||
where: { teamId, type: 'embedding', enabled: true },
|
||||
})
|
||||
settings.semanticSearchEnabled = !!embeddingAgent
|
||||
|
||||
return settings
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
|
||||
Reference in New Issue
Block a user