feat: expand speech provider support with new client types and config… (#389)

* feat: expand speech provider support with new client types and configuration schema

* feat: add icon support for speech providers and update related configurations

* feat: add SVG support for Deepgram and Elevenlabs with Vue components

* feat: except *-speech client type in llm provider

* feat: enhance speech provider functionality with advanced settings and model import capabilities

* chore: remove go.mod replace

* feat: enhance speech provider functionality with advanced settings and model import capabilities

* chore: update go module dependencies

---------

Co-authored-by: Acbox <acbox0328@gmail.com>
This commit is contained in:
Yiming Qi
2026-04-19 22:58:16 +09:00
committed by GitHub
parent 8e013ad1ad
commit 8d78925a23
46 changed files with 2808 additions and 565 deletions
+51 -4
View File
@@ -35,8 +35,19 @@ func (q *Queries) CountModelsByType(ctx context.Context, type_ string) (int64, e
}
const countProviders = `-- name: CountProviders :one
SELECT COUNT(*) FROM providers
WHERE client_type NOT IN ('edge-speech')
SELECT COUNT(*)
FROM providers
WHERE client_type NOT IN (
'edge-speech',
'openai-speech',
'openrouter-speech',
'elevenlabs-speech',
'deepgram-speech',
'minimax-speech',
'volcengine-speech',
'alibabacloud-speech',
'microsoft-speech'
)
`
func (q *Queries) CountProviders(ctx context.Context) (int64, error) {
@@ -190,6 +201,22 @@ func (q *Queries) DeleteModelByModelID(ctx context.Context, modelID string) erro
return err
}
const deleteModelByProviderIDAndModelID = `-- name: DeleteModelByProviderIDAndModelID :exec
DELETE FROM models
WHERE provider_id = $1
AND model_id = $2
`
type DeleteModelByProviderIDAndModelIDParams struct {
ProviderID pgtype.UUID `json:"provider_id"`
ModelID string `json:"model_id"`
}
func (q *Queries) DeleteModelByProviderIDAndModelID(ctx context.Context, arg DeleteModelByProviderIDAndModelIDParams) error {
_, err := q.db.Exec(ctx, deleteModelByProviderIDAndModelID, arg.ProviderID, arg.ModelID)
return err
}
const deleteProvider = `-- name: DeleteProvider :exec
DELETE FROM providers WHERE id = $1
`
@@ -717,7 +744,17 @@ func (q *Queries) ListModelsByType(ctx context.Context, type_ string) ([]Model,
const listProviders = `-- name: ListProviders :many
SELECT id, name, client_type, icon, enable, config, metadata, created_at, updated_at FROM providers
WHERE client_type NOT IN ('edge-speech')
WHERE client_type NOT IN (
'edge-speech',
'openai-speech',
'openrouter-speech',
'elevenlabs-speech',
'deepgram-speech',
'minimax-speech',
'volcengine-speech',
'alibabacloud-speech',
'microsoft-speech'
)
ORDER BY created_at DESC
`
@@ -840,7 +877,17 @@ func (q *Queries) ListSpeechModelsByProviderID(ctx context.Context, providerID p
const listSpeechProviders = `-- name: ListSpeechProviders :many
SELECT id, name, client_type, icon, enable, config, metadata, created_at, updated_at FROM providers
WHERE client_type IN ('edge-speech')
WHERE client_type IN (
'edge-speech',
'openai-speech',
'openrouter-speech',
'elevenlabs-speech',
'deepgram-speech',
'minimax-speech',
'volcengine-speech',
'alibabacloud-speech',
'microsoft-speech'
)
ORDER BY created_at DESC
`