mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
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:
+11
-13
@@ -430,7 +430,15 @@ func IsValidClientType(clientType ClientType) bool {
|
||||
ClientTypeGoogleGenerativeAI,
|
||||
ClientTypeOpenAICodex,
|
||||
ClientTypeGitHubCopilot,
|
||||
ClientTypeEdgeSpeech:
|
||||
ClientTypeEdgeSpeech,
|
||||
ClientTypeOpenAISpeech,
|
||||
ClientTypeOpenRouterSpeech,
|
||||
ClientTypeElevenLabsSpeech,
|
||||
ClientTypeDeepgramSpeech,
|
||||
ClientTypeMiniMaxSpeech,
|
||||
ClientTypeVolcengineSpeech,
|
||||
ClientTypeAlibabaSpeech,
|
||||
ClientTypeMicrosoftSpeech:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
@@ -438,19 +446,9 @@ func IsValidClientType(clientType ClientType) bool {
|
||||
}
|
||||
|
||||
// IsLLMClientType returns true if the client type belongs to the LLM domain
|
||||
// (chat/embedding), excluding speech-only types like edge-speech.
|
||||
// (chat/embedding), excluding speech-only types (any type ending in "-speech").
|
||||
func IsLLMClientType(clientType ClientType) bool {
|
||||
switch clientType {
|
||||
case ClientTypeOpenAIResponses,
|
||||
ClientTypeOpenAICompletions,
|
||||
ClientTypeAnthropicMessages,
|
||||
ClientTypeGoogleGenerativeAI,
|
||||
ClientTypeOpenAICodex,
|
||||
ClientTypeGitHubCopilot:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
return IsValidClientType(clientType) && !strings.HasSuffix(string(clientType), "-speech")
|
||||
}
|
||||
|
||||
// SelectMemoryModel selects a chat model for memory operations.
|
||||
|
||||
@@ -24,6 +24,14 @@ const (
|
||||
ClientTypeOpenAICodex ClientType = "openai-codex"
|
||||
ClientTypeGitHubCopilot ClientType = "github-copilot"
|
||||
ClientTypeEdgeSpeech ClientType = "edge-speech"
|
||||
ClientTypeOpenAISpeech ClientType = "openai-speech"
|
||||
ClientTypeOpenRouterSpeech ClientType = "openrouter-speech"
|
||||
ClientTypeElevenLabsSpeech ClientType = "elevenlabs-speech"
|
||||
ClientTypeDeepgramSpeech ClientType = "deepgram-speech"
|
||||
ClientTypeMiniMaxSpeech ClientType = "minimax-speech"
|
||||
ClientTypeVolcengineSpeech ClientType = "volcengine-speech"
|
||||
ClientTypeAlibabaSpeech ClientType = "alibabacloud-speech"
|
||||
ClientTypeMicrosoftSpeech ClientType = "microsoft-speech"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
Reference in New Issue
Block a user