mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
feat: except *-speech client type in llm provider
This commit is contained in:
@@ -85,4 +85,4 @@ export const CLIENT_TYPE_META: Record<string, ClientTypeMeta> = {
|
||||
export const CLIENT_TYPE_LIST: ClientTypeMeta[] = Object.values(CLIENT_TYPE_META)
|
||||
|
||||
export const LLM_CLIENT_TYPE_LIST: ClientTypeMeta[] = CLIENT_TYPE_LIST
|
||||
.filter(ct => ct.value !== 'edge-speech')
|
||||
.filter(ct => !ct.value.endsWith('-speech'))
|
||||
|
||||
@@ -446,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.
|
||||
|
||||
Reference in New Issue
Block a user