diff --git a/internal/entity/models/302ai.go b/internal/entity/models/302ai.go index b94292b0ea..15f45699a4 100644 --- a/internal/entity/models/302ai.go +++ b/internal/entity/models/302ai.go @@ -468,16 +468,16 @@ func (a *AI302Model) TranscribeAudio(ctx context.Context, modelName *string, fil } func (a *AI302Model) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s no such method", a.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", a.Name()) } func (a *AI302Model) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { // TODO https://302ai-en.apifox.cn/225254060e0 - return nil, fmt.Errorf("%s no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", a.Name()) } func (a *AI302Model) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s no such method", a.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", a.Name()) } func (a *AI302Model) OCRFile(ctx context.Context, modelName *string, content []byte, urls *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { @@ -697,7 +697,7 @@ func (a *AI302Model) ListModels(ctx context.Context, apiConfig *APIConfig) ([]Li } func (a *AI302Model) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", a.Name()) } func (a *AI302Model) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -706,7 +706,7 @@ func (a *AI302Model) CheckConnection(ctx context.Context, apiConfig *APIConfig) } func (a *AI302Model) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", a.Name()) } func (a *AI302Model) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { @@ -787,5 +787,5 @@ func (a *AI302Model) ShowTask(ctx context.Context, taskID string, apiConfig *API } func (a *AI302Model) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", a.Name()) } diff --git a/internal/entity/models/aliyun.go b/internal/entity/models/aliyun.go index ebe8ef06ba..865b671d0e 100644 --- a/internal/entity/models/aliyun.go +++ b/internal/entity/models/aliyun.go @@ -1064,12 +1064,12 @@ func (a *AliyunModel) AudioSpeechWithSender(ctx context.Context, modelName *stri // OCRFile OCR file func (a *AliyunModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", a.Name()) } // ParseFile parse file func (a *AliyunModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", a.Name()) } type AliyunModelItem struct { @@ -1145,7 +1145,7 @@ func (a *AliyunModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]L } func (a *AliyunModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", a.Name()) } func (a *AliyunModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -1157,13 +1157,13 @@ func (a *AliyunModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) } func (a *AliyunModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", a.Name()) } func (a *AliyunModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", a.Name()) } func (a *AliyunModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", a.Name()) } diff --git a/internal/entity/models/anthropic.go b/internal/entity/models/anthropic.go index 3e5eb26f4d..4d99c1265c 100644 --- a/internal/entity/models/anthropic.go +++ b/internal/entity/models/anthropic.go @@ -767,49 +767,49 @@ func (a *AnthropicModel) ChatStreamlyWithSender(ctx context.Context, modelName s } func (a *AnthropicModel) Embed(ctx context.Context, modelName *string, request EmbedRequest, apiConfig *APIConfig, embeddingConfig *EmbeddingConfig, modelUsage *common.ModelUsage) ([]EmbeddingData, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: Embed", a.Name()) } func (a *AnthropicModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", a.Name()) } func (a *AnthropicModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", a.Name()) } func (a *AnthropicModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", a.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", a.Name()) } func (a *AnthropicModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, asrConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", a.Name()) } func (a *AnthropicModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", a.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", a.Name()) } func (a *AnthropicModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", a.Name()) } func (a *AnthropicModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", a.Name()) } func (a *AnthropicModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", a.Name()) } func (a *AnthropicModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", a.Name()) } func (a *AnthropicModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", a.Name()) } func (a *AnthropicModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", a.Name()) } diff --git a/internal/entity/models/astraflow.go b/internal/entity/models/astraflow.go index 90927a0488..99b48bb9ca 100644 --- a/internal/entity/models/astraflow.go +++ b/internal/entity/models/astraflow.go @@ -330,15 +330,15 @@ func (a *AstraflowModel) Rerank(ctx context.Context, modelName *string, request } func (a *AstraflowModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", a.Name()) } func (a *AstraflowModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", a.Name()) } func (a *AstraflowModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", a.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", a.Name()) } func (a *AstraflowModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { @@ -401,25 +401,25 @@ func (a *AstraflowModel) AudioSpeech(ctx context.Context, modelName *string, aud } func (a *AstraflowModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", a.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", a.Name()) } func (a *AstraflowModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", a.Name()) } func (a *AstraflowModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", a.Name()) } func (a *AstraflowModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", a.Name()) } func (a *AstraflowModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", a.Name()) } func (a *AstraflowModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", a.Name()) } diff --git a/internal/entity/models/avian.go b/internal/entity/models/avian.go index c6a4f14928..1b54819406 100644 --- a/internal/entity/models/avian.go +++ b/internal/entity/models/avian.go @@ -182,49 +182,49 @@ func (a *AvianModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) } func (a *AvianModel) Embed(ctx context.Context, modelName *string, request EmbedRequest, apiConfig *APIConfig, embeddingConfig *EmbeddingConfig, modelUsage *common.ModelUsage) ([]EmbeddingData, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: Embed", a.Name()) } func (a *AvianModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", a.Name()) } func (a *AvianModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", a.Name()) } func (a *AvianModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", a.Name()) } func (a *AvianModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", a.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", a.Name()) } func (a *AvianModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", a.Name()) } func (a *AvianModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", a.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", a.Name()) } func (a *AvianModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", a.Name()) } func (a *AvianModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", a.Name()) } func (a *AvianModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", a.Name()) } func (a *AvianModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", a.Name()) } func (a *AvianModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", a.Name()) } diff --git a/internal/entity/models/azure_openai.go b/internal/entity/models/azure_openai.go index 3014732942..43f76a8501 100644 --- a/internal/entity/models/azure_openai.go +++ b/internal/entity/models/azure_openai.go @@ -327,46 +327,46 @@ func (a *AzureOpenAIModel) CheckConnection(ctx context.Context, apiConfig *APICo // Balance is not exposed by the Azure OpenAI API. func (a *AzureOpenAIModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Balance", a.Name()) } // Rerank is not exposed by the Azure OpenAI API. func (a *AzureOpenAIModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", a.Name()) } func (a *AzureOpenAIModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", a.Name()) } func (a *AzureOpenAIModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", a.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", a.Name()) } func (a *AzureOpenAIModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", a.Name()) } func (a *AzureOpenAIModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", a.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", a.Name()) } func (a *AzureOpenAIModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", a.Name()) } func (a *AzureOpenAIModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", a.Name()) } func (a *AzureOpenAIModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", a.Name()) } func (a *AzureOpenAIModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", a.Name()) } func (a *AzureOpenAIModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", a.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", a.Name()) } diff --git a/internal/entity/models/baichuan.go b/internal/entity/models/baichuan.go index 7b304c5344..d1ec5056bb 100644 --- a/internal/entity/models/baichuan.go +++ b/internal/entity/models/baichuan.go @@ -179,57 +179,57 @@ func (b *BaichuanModel) Embed(ctx context.Context, modelName *string, request Em } func (b *BaichuanModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Rerank", b.Name()) } // TranscribeAudio transcribe audio func (b *BaichuanModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", b.Name()) } func (b *BaichuanModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", b.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", b.Name()) } // AudioSpeech convert text to audio func (b *BaichuanModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", b.Name()) } func (b *BaichuanModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", b.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", b.Name()) } // OCRFile OCR file func (b *BaichuanModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", b.Name()) } // ParseFile parse file func (b *BaichuanModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", b.Name()) } func (b *BaichuanModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: ListModels", b.Name()) } func (b *BaichuanModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Balance", b.Name()) } func (b *BaichuanModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { - return fmt.Errorf("no such method") + return fmt.Errorf("%s: no such method: CheckConnection", b.Name()) } func (b *BaichuanModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", b.Name()) } func (b *BaichuanModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", b.Name()) } func (b *BaichuanModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", b.Name()) } diff --git a/internal/entity/models/baidu.go b/internal/entity/models/baidu.go index 0fd5e11173..fb4bedf4b0 100644 --- a/internal/entity/models/baidu.go +++ b/internal/entity/models/baidu.go @@ -382,20 +382,20 @@ func (b *BaiduModel) Rerank(ctx context.Context, modelName *string, request Rera // TranscribeAudio transcribe audio func (b *BaiduModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", b.Name()) } func (b *BaiduModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", b.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", b.Name()) } // AudioSpeech convert text to audio func (b *BaiduModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", b.Name()) } func (b *BaiduModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", b.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", b.Name()) } // OCRFile OCR file @@ -552,7 +552,7 @@ func (b *BaiduModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]Li } func (b *BaiduModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", b.Name()) } func (b *BaiduModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -561,17 +561,17 @@ func (b *BaiduModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) } func (b *BaiduModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", b.Name()) } func (b *BaiduModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", b.Name()) } func (b *BaiduModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", b.Name()) } func (b *BaiduModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", b.Name()) } diff --git a/internal/entity/models/bedrock.go b/internal/entity/models/bedrock.go index 7858f85cc9..0cf662c89f 100644 --- a/internal/entity/models/bedrock.go +++ b/internal/entity/models/bedrock.go @@ -1169,55 +1169,55 @@ func decodeCohereEmbeddingVectors(raw json.RawMessage) ([][]float64, error) { // Rerank is not exposed by Bedrock. func (b *BedrockModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", b.Name()) } // Balance is not exposed by Bedrock. func (b *BedrockModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", b.Name()) } // TranscribeAudio is not exposed by Bedrock. Speech-to-text on AWS // lives in Amazon Transcribe, a separate service. func (b *BedrockModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", b.Name()) } func (b *BedrockModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", b.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", b.Name()) } // AudioSpeech is not exposed by Bedrock. Text-to-speech on AWS lives // in Amazon Polly, a separate service. func (b *BedrockModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", b.Name()) } func (b *BedrockModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", b.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", b.Name()) } // OCRFile is not exposed by Bedrock. OCR on AWS lives in Amazon // Textract, a separate service. func (b *BedrockModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", b.Name()) } // ParseFile is not exposed by Bedrock. func (b *BedrockModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", b.Name()) } // ListTasks is not exposed by Bedrock through the Converse API. func (b *BedrockModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", b.Name()) } // ShowTask is not exposed by Bedrock through the Converse API. func (b *BedrockModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", b.Name()) } func (b *BedrockModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", b.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", b.Name()) } diff --git a/internal/entity/models/cohere.go b/internal/entity/models/cohere.go index 25b9789c99..9826ac4e28 100644 --- a/internal/entity/models/cohere.go +++ b/internal/entity/models/cohere.go @@ -655,26 +655,26 @@ func (c *CoHereModel) TranscribeAudio(ctx context.Context, modelName *string, fi } func (c *CoHereModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", c.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", c.Name()) } // AudioSpeech convert text to audio func (c *CoHereModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", c.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", c.Name()) } func (c *CoHereModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", c.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", c.Name()) } // OCRFile OCR file func (c *CoHereModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", c.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", c.Name()) } // ParseFile parse file func (c *CoHereModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", c.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", c.Name()) } func (c *CoHereModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { @@ -737,7 +737,7 @@ func (c *CoHereModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]L } func (c *CoHereModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", c.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", c.Name()) } func (c *CoHereModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -746,13 +746,13 @@ func (c *CoHereModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) } func (c *CoHereModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", c.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", c.Name()) } func (c *CoHereModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", c.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", c.Name()) } func (c *CoHereModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", c.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", c.Name()) } diff --git a/internal/entity/models/cometapi.go b/internal/entity/models/cometapi.go index 1828d933ba..e2a54d0d2d 100644 --- a/internal/entity/models/cometapi.go +++ b/internal/entity/models/cometapi.go @@ -344,7 +344,7 @@ func (c *CometAPIModel) CheckConnection(ctx context.Context, apiConfig *APIConfi // Rerank calculates similarity scores between query and documents. func (c *CometAPIModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Rerank", c.Name()) } // TranscribeAudio transcribe audio @@ -463,7 +463,7 @@ func (c *CometAPIModel) TranscribeAudio(ctx context.Context, modelName *string, } func (c *CometAPIModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", c.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", c.Name()) } // AudioSpeech synthesizes speech audio from text. @@ -527,26 +527,26 @@ func (c *CometAPIModel) AudioSpeech(ctx context.Context, modelName *string, audi } func (c *CometAPIModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", c.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", c.Name()) } // OCRFile OCR file func (c *CometAPIModel) OCRFile(ctx context.Context, modelName *string, content []byte, baseURL *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", c.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", c.Name()) } func (c *CometAPIModel) ParseFile(ctx context.Context, modelName *string, content []byte, baseURL *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", c.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", c.Name()) } func (c *CometAPIModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", c.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", c.Name()) } func (c *CometAPIModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", c.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", c.Name()) } func (c *CometAPIModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", c.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", c.Name()) } diff --git a/internal/entity/models/deepinfra.go b/internal/entity/models/deepinfra.go index 6f72cd6ed2..a89b345e55 100644 --- a/internal/entity/models/deepinfra.go +++ b/internal/entity/models/deepinfra.go @@ -420,7 +420,7 @@ func (d *DeepInfraModel) TranscribeAudio(ctx context.Context, modelName *string, } func (d *DeepInfraModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s no such method", d.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", d.Name()) } func (d *DeepInfraModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { @@ -599,11 +599,11 @@ func (d *DeepInfraModel) AudioSpeechWithSender(ctx context.Context, modelName *s } func (d *DeepInfraModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s no such method", d.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", d.Name()) } func (d *DeepInfraModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s no such method", d.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", d.Name()) } func (d *DeepInfraModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { @@ -722,13 +722,13 @@ func (d *DeepInfraModel) CheckConnection(ctx context.Context, apiConfig *APIConf } func (d *DeepInfraModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s no such method", d.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", d.Name()) } func (d *DeepInfraModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s no such method", d.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", d.Name()) } func (d *DeepInfraModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", d.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", d.Name()) } diff --git a/internal/entity/models/deepseek.go b/internal/entity/models/deepseek.go index 945cc5eae2..23efe47473 100644 --- a/internal/entity/models/deepseek.go +++ b/internal/entity/models/deepseek.go @@ -170,7 +170,7 @@ func applyDeepSeekThinkingConfig(reqBody map[string]any, config *ChatConfig) err // Embed embeds a list of texts into embeddings func (d *DeepSeekModel) Embed(ctx context.Context, modelName *string, request EmbedRequest, apiConfig *APIConfig, embeddingConfig *EmbeddingConfig, modelUsage *common.ModelUsage) ([]EmbeddingData, error) { - return nil, fmt.Errorf("%s, no such method", d.Name()) + return nil, fmt.Errorf("%s: no such method: Embed", d.Name()) } func (d *DeepSeekModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { @@ -316,40 +316,40 @@ func (d *DeepSeekModel) Rerank(ctx context.Context, modelName *string, request R // TranscribeAudio transcribe audio func (d *DeepSeekModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", d.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", d.Name()) } func (d *DeepSeekModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", d.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", d.Name()) } // AudioSpeech convert text to audio func (d *DeepSeekModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", d.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", d.Name()) } func (d *DeepSeekModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", d.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", d.Name()) } // OCRFile OCR file func (d *DeepSeekModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", d.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", d.Name()) } // ParseFile parse file func (d *DeepSeekModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", d.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", d.Name()) } func (d *DeepSeekModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", d.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", d.Name()) } func (d *DeepSeekModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", d.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", d.Name()) } func (d *DeepSeekModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", d.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", d.Name()) } diff --git a/internal/entity/models/dummy.go b/internal/entity/models/dummy.go index 047ce2fb0e..4a8cb11ea2 100644 --- a/internal/entity/models/dummy.go +++ b/internal/entity/models/dummy.go @@ -71,30 +71,30 @@ func (d *DummyModel) Rerank(ctx context.Context, modelName *string, request Rera // TranscribeAudio transcribe audio func (d *DummyModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", d.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", d.Name()) } func (d *DummyModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", d.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", d.Name()) } // AudioSpeech convert text to audio func (d *DummyModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", d.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", d.Name()) } func (d *DummyModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", d.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", d.Name()) } // OCRFile OCR file func (d *DummyModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", d.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", d.Name()) } // ParseFile parse file func (d *DummyModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", d.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", d.Name()) } func (d *DummyModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { @@ -102,21 +102,21 @@ func (d *DummyModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]Li } func (d *DummyModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Balance", d.Name()) } func (d *DummyModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { - return fmt.Errorf("no such method") + return fmt.Errorf("%s: no such method: CheckConnection", d.Name()) } func (d *DummyModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", d.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", d.Name()) } func (d *DummyModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", d.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", d.Name()) } func (d *DummyModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", d.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", d.Name()) } diff --git a/internal/entity/models/fishaudio.go b/internal/entity/models/fishaudio.go index 24aef65e66..e85f0e3ee9 100644 --- a/internal/entity/models/fishaudio.go +++ b/internal/entity/models/fishaudio.go @@ -55,19 +55,19 @@ func (f *FishAudioModel) Name() string { } func (f *FishAudioModel) ChatWithMessages(ctx context.Context, modelName string, messages []Message, apiConfig *APIConfig, chatModelConfig *ChatConfig, modelUsage *common.ModelUsage) (*ChatResponse, error) { - return nil, fmt.Errorf("%s, no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: ChatWithMessages", f.Name()) } func (f *FishAudioModel) ChatStreamlyWithSender(ctx context.Context, modelName string, messages []Message, apiConfig *APIConfig, modelConfig *ChatConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", f.Name()) + return fmt.Errorf("%s: no such method: ChatStreamlyWithSender", f.Name()) } func (f *FishAudioModel) Embed(ctx context.Context, modelName *string, request EmbedRequest, apiConfig *APIConfig, embeddingConfig *EmbeddingConfig, modelUsage *common.ModelUsage) ([]EmbeddingData, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Embed", f.Name()) } func (f *FishAudioModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Rerank", f.Name()) } // TranscribeAudio transcribe audio @@ -177,7 +177,7 @@ func (f *FishAudioModel) TranscribeAudio(ctx context.Context, modelName *string, } func (f *FishAudioModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", f.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", f.Name()) } // AudioSpeech convert text to audio @@ -327,12 +327,12 @@ func (f *FishAudioModel) AudioSpeechWithSender(ctx context.Context, modelName *s // OCRFile OCR file func (f *FishAudioModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", f.Name()) } // ParseFile parse file func (f *FishAudioModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", f.Name()) } func (f *FishAudioModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { @@ -447,13 +447,13 @@ func (f *FishAudioModel) CheckConnection(ctx context.Context, apiConfig *APIConf } func (f *FishAudioModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", f.Name()) } func (f *FishAudioModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", f.Name()) } func (f *FishAudioModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", f.Name()) } diff --git a/internal/entity/models/funasr.go b/internal/entity/models/funasr.go index 7471f8e383..b945366a5d 100644 --- a/internal/entity/models/funasr.go +++ b/internal/entity/models/funasr.go @@ -55,19 +55,19 @@ func (f *FunASR) Name() string { } func (f *FunASR) ChatWithMessages(ctx context.Context, modelName string, messages []Message, apiConfig *APIConfig, chatModelConfig *ChatConfig, modelUsage *common.ModelUsage) (*ChatResponse, error) { - return nil, fmt.Errorf("%s no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: ChatWithMessages", f.Name()) } func (f *FunASR) ChatStreamlyWithSender(ctx context.Context, modelName string, messages []Message, apiConfig *APIConfig, modelConfig *ChatConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s no such method", f.Name()) + return fmt.Errorf("%s: no such method: ChatStreamlyWithSender", f.Name()) } func (f *FunASR) Embed(ctx context.Context, modelName *string, request EmbedRequest, apiConfig *APIConfig, embeddingConfig *EmbeddingConfig, modelUsage *common.ModelUsage) ([]EmbeddingData, error) { - return nil, fmt.Errorf("%s no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: Embed", f.Name()) } func (f *FunASR) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("%s no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", f.Name()) } func (f *FunASR) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { @@ -193,23 +193,23 @@ func (f *FunASR) TranscribeAudio(ctx context.Context, modelName *string, file *s } func (f *FunASR) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s no such method", f.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", f.Name()) } func (f *FunASR) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", f.Name()) } func (f *FunASR) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s no such method", f.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", f.Name()) } func (f *FunASR) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", f.Name()) } func (f *FunASR) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", f.Name()) } func (f *FunASR) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { @@ -264,7 +264,7 @@ func (f *FunASR) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListMo } func (f *FunASR) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", f.Name()) } func (f *FunASR) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -273,13 +273,13 @@ func (f *FunASR) CheckConnection(ctx context.Context, apiConfig *APIConfig) erro } func (f *FunASR) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", f.Name()) } func (f *FunASR) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", f.Name()) } func (f *FunASR) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", f.Name()) } diff --git a/internal/entity/models/futurmix.go b/internal/entity/models/futurmix.go index d3f537d12c..bf9154337b 100644 --- a/internal/entity/models/futurmix.go +++ b/internal/entity/models/futurmix.go @@ -129,67 +129,67 @@ func (f *FuturMixModel) ChatStreamlyWithSender(ctx context.Context, modelName st // Embed is not exposed by the FuturMix API per the public docs. func (f *FuturMixModel) Embed(ctx context.Context, modelName *string, request EmbedRequest, apiConfig *APIConfig, embeddingConfig *EmbeddingConfig, modelUsage *common.ModelUsage) ([]EmbeddingData, error) { - return nil, fmt.Errorf("%s, no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: Embed", f.Name()) } // Rerank is not exposed by the FuturMix API per the public docs. func (f *FuturMixModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("%s, no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", f.Name()) } // ListModels is not documented as a public endpoint by FuturMix. func (f *FuturMixModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { - return nil, fmt.Errorf("%s, no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: ListModels", f.Name()) } // CheckConnection is not exposed by the FuturMix API. func (f *FuturMixModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { - return fmt.Errorf("%s, no such method", f.Name()) + return fmt.Errorf("%s: no such method: CheckConnection", f.Name()) } // Balance is not exposed by the FuturMix public API. func (f *FuturMixModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", f.Name()) } // TranscribeAudio is not exposed by the FuturMix API per the docs. func (f *FuturMixModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", f.Name()) } func (f *FuturMixModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", f.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", f.Name()) } // AudioSpeech is not exposed by the FuturMix API per the docs. func (f *FuturMixModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", f.Name()) } func (f *FuturMixModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", f.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", f.Name()) } // OCRFile is not exposed by the FuturMix API per the docs. func (f *FuturMixModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", f.Name()) } // ParseFile is not exposed by the FuturMix API per the docs. func (f *FuturMixModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", f.Name()) } // ListTasks is not exposed by the FuturMix API per the docs. func (f *FuturMixModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", f.Name()) } // ShowTask is not exposed by the FuturMix API per the docs. func (f *FuturMixModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", f.Name()) } func (f *FuturMixModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", f.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", f.Name()) } diff --git a/internal/entity/models/gitee.go b/internal/entity/models/gitee.go index b9624e6f4e..56b28117ed 100644 --- a/internal/entity/models/gitee.go +++ b/internal/entity/models/gitee.go @@ -347,20 +347,20 @@ func (g *GiteeModel) Rerank(ctx context.Context, modelName *string, request Rera // TranscribeAudio transcribe audio func (g *GiteeModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", g.Name()) } func (g *GiteeModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", g.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", g.Name()) } // AudioSpeech convert text to audio func (g *GiteeModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", g.Name()) } func (g *GiteeModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", g.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", g.Name()) } type giteeOCRResponse struct { @@ -923,5 +923,5 @@ func (g *GiteeModel) ShowTask(ctx context.Context, taskID string, apiConfig *API } func (g *GiteeModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", g.Name()) } diff --git a/internal/entity/models/google.go b/internal/entity/models/google.go index 66f486ab4f..25cb24f1fc 100644 --- a/internal/entity/models/google.go +++ b/internal/entity/models/google.go @@ -679,7 +679,7 @@ func (g *GoogleModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]L } func (g *GoogleModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Balance", g.Name()) } func (g *GoogleModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -694,40 +694,40 @@ func (g *GoogleModel) Rerank(ctx context.Context, modelName *string, request Rer // TranscribeAudio transcribe audio func (g *GoogleModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", g.Name()) } func (g *GoogleModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", g.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", g.Name()) } // AudioSpeech convert text to audio func (g *GoogleModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", g.Name()) } func (g *GoogleModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", g.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", g.Name()) } // OCRFile OCR file func (g *GoogleModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", g.Name()) } // ParseFile parse file func (g *GoogleModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", g.Name()) } func (g *GoogleModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", g.Name()) } func (g *GoogleModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", g.Name()) } func (g *GoogleModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", g.Name()) } diff --git a/internal/entity/models/gpustack.go b/internal/entity/models/gpustack.go index 35285cfa7b..052f6a72db 100644 --- a/internal/entity/models/gpustack.go +++ b/internal/entity/models/gpustack.go @@ -347,7 +347,7 @@ func (g *GPUStackModel) Rerank(ctx context.Context, modelName *string, request R } func (g *GPUStackModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", g.Name()) } func (g *GPUStackModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { @@ -371,21 +371,21 @@ func (g *GPUStackModel) AudioSpeechWithSender(ctx context.Context, modelName *st } func (g *GPUStackModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", g.Name()) } func (g *GPUStackModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", g.Name()) } func (g *GPUStackModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", g.Name()) } func (g *GPUStackModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", g.Name()) } func (g *GPUStackModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", g.Name()) } diff --git a/internal/entity/models/greenpt.go b/internal/entity/models/greenpt.go index 2570202d60..04c726e10a 100644 --- a/internal/entity/models/greenpt.go +++ b/internal/entity/models/greenpt.go @@ -224,5 +224,5 @@ func (m *GreenPTModel) TranscribeAudio(ctx context.Context, modelName *string, f } func (g *GreenPTModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", g.Name()) } diff --git a/internal/entity/models/groq.go b/internal/entity/models/groq.go index 78179d96d7..7313bfbc52 100644 --- a/internal/entity/models/groq.go +++ b/internal/entity/models/groq.go @@ -221,15 +221,15 @@ func (g *GroqModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) e } func (g *GroqModel) Embed(ctx context.Context, modelName *string, request EmbedRequest, apiConfig *APIConfig, embeddingConfig *EmbeddingConfig, modelUsage *common.ModelUsage) ([]EmbeddingData, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: Embed", g.Name()) } func (g *GroqModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", g.Name()) } func (g *GroqModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", g.Name()) } func (g *GroqModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { @@ -349,7 +349,7 @@ func (g *GroqModel) TranscribeAudio(ctx context.Context, modelName *string, file } func (g *GroqModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", g.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", g.Name()) } func (g *GroqModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { @@ -412,25 +412,25 @@ func (g *GroqModel) AudioSpeech(ctx context.Context, modelName *string, audioCon } func (g *GroqModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", g.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", g.Name()) } func (g *GroqModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", g.Name()) } func (g *GroqModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", g.Name()) } func (g *GroqModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", g.Name()) } func (g *GroqModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", g.Name()) } func (g *GroqModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", g.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", g.Name()) } diff --git a/internal/entity/models/huaweicloud.go b/internal/entity/models/huaweicloud.go index 9515ca3e8f..d21109b64b 100644 --- a/internal/entity/models/huaweicloud.go +++ b/internal/entity/models/huaweicloud.go @@ -457,27 +457,27 @@ func (h *HuaweiCloudModel) Rerank(ctx context.Context, modelName *string, reques } func (h *HuaweiCloudModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", h.Name()) } func (h *HuaweiCloudModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", h.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", h.Name()) } func (h *HuaweiCloudModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", h.Name()) } func (h *HuaweiCloudModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", h.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", h.Name()) } func (h *HuaweiCloudModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", h.Name()) } func (h *HuaweiCloudModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", h.Name()) } func (h *HuaweiCloudModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { @@ -533,7 +533,7 @@ func (h *HuaweiCloudModel) ListModels(ctx context.Context, apiConfig *APIConfig) } func (h *HuaweiCloudModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", h.Name()) } func (h *HuaweiCloudModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -542,13 +542,13 @@ func (h *HuaweiCloudModel) CheckConnection(ctx context.Context, apiConfig *APICo } func (h *HuaweiCloudModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", h.Name()) } func (h *HuaweiCloudModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", h.Name()) } func (h *HuaweiCloudModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", h.Name()) } diff --git a/internal/entity/models/huggingface.go b/internal/entity/models/huggingface.go index e1576051b3..a922780c01 100644 --- a/internal/entity/models/huggingface.go +++ b/internal/entity/models/huggingface.go @@ -191,35 +191,35 @@ func (h *HuggingFaceModel) Embed(ctx context.Context, modelName *string, request } func (h *HuggingFaceModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Rerank", h.Name()) } // TranscribeAudio transcribe audio func (h *HuggingFaceModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", h.Name()) } func (h *HuggingFaceModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", h.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", h.Name()) } // AudioSpeech convert text to audio func (h *HuggingFaceModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", h.Name()) } func (h *HuggingFaceModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", h.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", h.Name()) } // OCRFile OCR file func (h *HuggingFaceModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", h.Name()) } // ParseFile parse file func (h *HuggingFaceModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", h.Name()) } func (h *HuggingFaceModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { @@ -280,7 +280,7 @@ func (h *HuggingFaceModel) ListModels(ctx context.Context, apiConfig *APIConfig) } func (h *HuggingFaceModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Balance", h.Name()) } func (h *HuggingFaceModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -289,13 +289,13 @@ func (h *HuggingFaceModel) CheckConnection(ctx context.Context, apiConfig *APICo } func (h *HuggingFaceModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", h.Name()) } func (h *HuggingFaceModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", h.Name()) } func (h *HuggingFaceModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", h.Name()) } diff --git a/internal/entity/models/hunyuan.go b/internal/entity/models/hunyuan.go index 5e0f23c431..1a8a333f91 100644 --- a/internal/entity/models/hunyuan.go +++ b/internal/entity/models/hunyuan.go @@ -251,45 +251,45 @@ func (h *HunyuanModel) Embed(ctx context.Context, modelName *string, request Emb } func (h *HunyuanModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", h.Name()) } func (h *HunyuanModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", h.Name()) } func (h *HunyuanModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", h.Name()) } func (h *HunyuanModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", h.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", h.Name()) } func (h *HunyuanModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", h.Name()) } func (h *HunyuanModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", h.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", h.Name()) } func (h *HunyuanModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", h.Name()) } func (h *HunyuanModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", h.Name()) } func (h *HunyuanModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", h.Name()) } func (h *HunyuanModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", h.Name()) } func (h *HunyuanModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", h.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", h.Name()) } diff --git a/internal/entity/models/jiekouai.go b/internal/entity/models/jiekouai.go index 3dae389236..3a8e994530 100644 --- a/internal/entity/models/jiekouai.go +++ b/internal/entity/models/jiekouai.go @@ -331,27 +331,27 @@ func (j *JieKouAIModel) Rerank(ctx context.Context, modelName *string, request R } func (j *JieKouAIModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", j.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", j.Name()) } func (j *JieKouAIModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", j.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", j.Name()) } func (j *JieKouAIModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", j.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", j.Name()) } func (j *JieKouAIModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", j.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", j.Name()) } func (j *JieKouAIModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", j.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", j.Name()) } func (j *JieKouAIModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", j.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", j.Name()) } func (j *JieKouAIModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { @@ -413,7 +413,7 @@ func (j *JieKouAIModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([ } func (j *JieKouAIModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", j.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", j.Name()) } func (j *JieKouAIModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -422,13 +422,13 @@ func (j *JieKouAIModel) CheckConnection(ctx context.Context, apiConfig *APIConfi } func (j *JieKouAIModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s no such method", j.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", j.Name()) } func (j *JieKouAIModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s no such method", j.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", j.Name()) } func (j *JieKouAIModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", j.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", j.Name()) } diff --git a/internal/entity/models/jina.go b/internal/entity/models/jina.go index 77638d5157..b376c7960d 100644 --- a/internal/entity/models/jina.go +++ b/internal/entity/models/jina.go @@ -685,7 +685,7 @@ func (j *JinaModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]Lis } func (j *JinaModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Balance", j.Name()) } func (j *JinaModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -695,40 +695,40 @@ func (j *JinaModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) e // TranscribeAudio transcribe audio func (j *JinaModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", j.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", j.Name()) } func (j *JinaModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", j.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", j.Name()) } // AudioSpeech convert text to audio func (j *JinaModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", j.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", j.Name()) } func (j *JinaModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", j.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", j.Name()) } // OCRFile OCR file func (j *JinaModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", j.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", j.Name()) } // ParseFile parse file func (j *JinaModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", j.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", j.Name()) } func (j *JinaModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", j.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", j.Name()) } func (j *JinaModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", j.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", j.Name()) } func (j *JinaModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", j.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", j.Name()) } diff --git a/internal/entity/models/lmstudio.go b/internal/entity/models/lmstudio.go index 3d7b89921f..3f0afc8b6a 100644 --- a/internal/entity/models/lmstudio.go +++ b/internal/entity/models/lmstudio.go @@ -224,35 +224,35 @@ func (l *LmStudioModel) Embed(ctx context.Context, modelName *string, request Em } func (l *LmStudioModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Rerank", l.Name()) } // TranscribeAudio transcribe audio func (l *LmStudioModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", l.Name()) } func (l *LmStudioModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", l.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", l.Name()) } // AudioSpeech convert text to audio func (l *LmStudioModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", l.Name()) } func (l *LmStudioModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", l.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", l.Name()) } // OCRFile OCR file func (l *LmStudioModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", l.Name()) } // ParseFile parse file func (l *LmStudioModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", l.Name()) } // ListModels list supported models @@ -324,7 +324,7 @@ func (l *LmStudioModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([ } func (l *LmStudioModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Balance", l.Name()) } // CheckConnection verifies that the configured LM Studio base URL is reachable @@ -334,13 +334,13 @@ func (l *LmStudioModel) CheckConnection(ctx context.Context, apiConfig *APIConfi } func (l *LmStudioModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", l.Name()) } func (l *LmStudioModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", l.Name()) } func (l *LmStudioModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", l.Name()) } diff --git a/internal/entity/models/localai.go b/internal/entity/models/localai.go index c708efe4f4..c627b7b01f 100644 --- a/internal/entity/models/localai.go +++ b/internal/entity/models/localai.go @@ -371,7 +371,7 @@ func (l *LocalAIModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([] } func (l *LocalAIModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Balance", l.Name()) } func (l *LocalAIModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -383,39 +383,39 @@ func (l *LocalAIModel) CheckConnection(ctx context.Context, apiConfig *APIConfig } func (l *LocalAIModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", l.Name()) } func (l *LocalAIModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", l.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", l.Name()) } // AudioSpeech convert text to audio func (l *LocalAIModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", l.Name()) } func (l *LocalAIModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", l.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", l.Name()) } func (l *LocalAIModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", l.Name()) } // ParseFile parse file func (l *LocalAIModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", l.Name()) } func (l *LocalAIModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", l.Name()) } func (l *LocalAIModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", l.Name()) } func (l *LocalAIModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", l.Name()) } diff --git a/internal/entity/models/longcat.go b/internal/entity/models/longcat.go index 638ce4c8cf..7e04017e3f 100644 --- a/internal/entity/models/longcat.go +++ b/internal/entity/models/longcat.go @@ -205,54 +205,54 @@ func (l *LongCatModel) CheckConnection(ctx context.Context, apiConfig *APIConfig } func (l *LongCatModel) Embed(ctx context.Context, modelName *string, request EmbedRequest, apiConfig *APIConfig, embeddingConfig *EmbeddingConfig, modelUsage *common.ModelUsage) ([]EmbeddingData, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: Embed", l.Name()) } // Rerank is not exposed by the LongCat API. func (l *LongCatModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", l.Name()) } // Balance is not exposed by the LongCat API. func (l *LongCatModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", l.Name()) } // TranscribeAudio (ASR) is not exposed by the LongCat API. func (l *LongCatModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", l.Name()) } func (l *LongCatModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", l.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", l.Name()) } // AudioSpeech (TTS) is not exposed by the LongCat API. func (l *LongCatModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", l.Name()) } func (l *LongCatModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", l.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", l.Name()) } func (l *LongCatModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", l.Name()) } // ParseFile parse file func (l *LongCatModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", l.Name()) } func (l *LongCatModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", l.Name()) } func (l *LongCatModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", l.Name()) } func (l *LongCatModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", l.Name()) } diff --git a/internal/entity/models/mineru.go b/internal/entity/models/mineru.go index 471cc5121f..7a6a7b058b 100644 --- a/internal/entity/models/mineru.go +++ b/internal/entity/models/mineru.go @@ -49,35 +49,35 @@ func (m *MinerUModel) Name() string { } func (m *MinerUModel) ChatWithMessages(ctx context.Context, modelName string, messages []Message, apiConfig *APIConfig, chatModelConfig *ChatConfig, modelUsage *common.ModelUsage) (*ChatResponse, error) { - return nil, fmt.Errorf("%s no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: ChatWithMessages", m.Name()) } func (m *MinerUModel) ChatStreamlyWithSender(ctx context.Context, modelName string, messages []Message, apiConfig *APIConfig, modelConfig *ChatConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s no such method", m.Name()) + return fmt.Errorf("%s: no such method: ChatStreamlyWithSender", m.Name()) } func (m *MinerUModel) Embed(ctx context.Context, modelName *string, request EmbedRequest, apiConfig *APIConfig, embeddingConfig *EmbeddingConfig, modelUsage *common.ModelUsage) ([]EmbeddingData, error) { - return nil, fmt.Errorf("%s no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: Embed", m.Name()) } func (m *MinerUModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("%s no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", m.Name()) } func (m *MinerUModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", m.Name()) } func (m *MinerUModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s no such method", m.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", m.Name()) } func (m *MinerUModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", m.Name()) } func (m *MinerUModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s no such method", m.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", m.Name()) } func (m *MinerUModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { @@ -92,11 +92,11 @@ func (m *MinerUModel) OCRFile(ctx context.Context, modelName *string, content [] } func (m *MinerUModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { - return nil, fmt.Errorf("%s no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: ListModels", m.Name()) } func (m *MinerUModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", m.Name()) } func (m *MinerUModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -223,7 +223,7 @@ func (m *MinerUModel) ParseFile(ctx context.Context, modelName *string, content } func (m *MinerUModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", m.Name()) } type mineruTaskQueryResponse struct { @@ -315,5 +315,5 @@ func (m *MinerUModel) ShowTask(ctx context.Context, taskID string, apiConfig *AP } func (m *MinerUModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", m.Name()) } diff --git a/internal/entity/models/mineru_local.go b/internal/entity/models/mineru_local.go index 6a058ab43c..26e2c47d2e 100644 --- a/internal/entity/models/mineru_local.go +++ b/internal/entity/models/mineru_local.go @@ -62,35 +62,35 @@ func (m *MinerULocalModel) GetBaseURL(apiConfig *APIConfig) (string, error) { } func (m *MinerULocalModel) ChatWithMessages(ctx context.Context, modelName string, messages []Message, apiConfig *APIConfig, chatModelConfig *ChatConfig, modelUsage *common.ModelUsage) (*ChatResponse, error) { - return nil, fmt.Errorf("%s no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: ChatWithMessages", m.Name()) } func (m *MinerULocalModel) ChatStreamlyWithSender(ctx context.Context, modelName string, messages []Message, apiConfig *APIConfig, modelConfig *ChatConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s no such method", m.Name()) + return fmt.Errorf("%s: no such method: ChatStreamlyWithSender", m.Name()) } func (m *MinerULocalModel) Embed(ctx context.Context, modelName *string, request EmbedRequest, apiConfig *APIConfig, embeddingConfig *EmbeddingConfig, modelUsage *common.ModelUsage) ([]EmbeddingData, error) { - return nil, fmt.Errorf("%s no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: Embed", m.Name()) } func (m *MinerULocalModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("%s no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", m.Name()) } func (m *MinerULocalModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", m.Name()) } func (m *MinerULocalModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s no such method", m.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", m.Name()) } func (m *MinerULocalModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", m.Name()) } func (m *MinerULocalModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s no such method", m.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", m.Name()) } // OCRFile is exercised during model verification (verifyOCRModel). Local MinerU @@ -114,7 +114,7 @@ func (m *MinerULocalModel) ListModels(ctx context.Context, apiConfig *APIConfig) } func (m *MinerULocalModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", m.Name()) } func (m *MinerULocalModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -338,7 +338,7 @@ func (m *MinerULocalModel) ParseFile(ctx context.Context, modelName *string, con } func (m *MinerULocalModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", m.Name()) } func (m *MinerULocalModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { @@ -429,5 +429,5 @@ func (m *MinerULocalModel) ShowTask(ctx context.Context, taskID string, apiConfi } func (m *MinerULocalModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", m.Name()) } diff --git a/internal/entity/models/minimax.go b/internal/entity/models/minimax.go index f9542ab9bf..2a72a8551f 100644 --- a/internal/entity/models/minimax.go +++ b/internal/entity/models/minimax.go @@ -380,7 +380,7 @@ func (m *MinimaxModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([] } func (m *MinimaxModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", m.Name()) } func (m *MinimaxModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -395,11 +395,11 @@ func (m *MinimaxModel) Rerank(ctx context.Context, modelName *string, request Re // TranscribeAudio transcribe audio func (m *MinimaxModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", m.Name()) } func (m *MinimaxModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", m.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", m.Name()) } // AudioSpeech convert text to audio @@ -585,22 +585,22 @@ func (m *MinimaxModel) AudioSpeechWithSender(ctx context.Context, modelName *str // OCRFile OCR file func (m *MinimaxModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", m.Name()) } // ParseFile parse file func (m *MinimaxModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", m.Name()) } func (m *MinimaxModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", m.Name()) } func (m *MinimaxModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", m.Name()) } func (m *MinimaxModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", m.Name()) } diff --git a/internal/entity/models/mistral.go b/internal/entity/models/mistral.go index 0f36a5ae27..8c59628719 100644 --- a/internal/entity/models/mistral.go +++ b/internal/entity/models/mistral.go @@ -344,7 +344,7 @@ func (m *MistralModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([] // Balance is not exposed by the Mistral API, so this returns "no such method". func (m *MistralModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", m.Name()) } // CheckConnection runs a lightweight ListModels call to verify the API key. @@ -355,7 +355,7 @@ func (m *MistralModel) CheckConnection(ctx context.Context, apiConfig *APIConfig // Rerank calculates similarity scores between query and documents func (m *MistralModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", m.Name()) } // TranscribeAudio transcribe audio @@ -483,7 +483,7 @@ func writeMistralFormField(writer *multipart.Writer, key string, value interface } func (m *MistralModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", m.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", m.Name()) } // AudioSpeech convert text to audio @@ -568,21 +568,21 @@ func (m *MistralModel) AudioSpeech(ctx context.Context, modelName *string, audio } func (m *MistralModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", m.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", m.Name()) } func (m *MistralModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", m.Name()) } func (m *MistralModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", m.Name()) } func (m *MistralModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", m.Name()) } func (m *MistralModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", m.Name()) } diff --git a/internal/entity/models/modelscope.go b/internal/entity/models/modelscope.go index 2b50702294..0e91a406c7 100644 --- a/internal/entity/models/modelscope.go +++ b/internal/entity/models/modelscope.go @@ -109,35 +109,35 @@ func (m *ModelScopeModel) ChatStreamlyWithSender(ctx context.Context, modelName } func (m *ModelScopeModel) Embed(ctx context.Context, modelName *string, request EmbedRequest, apiConfig *APIConfig, embeddingConfig *EmbeddingConfig, modelUsage *common.ModelUsage) ([]EmbeddingData, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: Embed", m.Name()) } func (m *ModelScopeModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", m.Name()) } func (m *ModelScopeModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", m.Name()) } func (m *ModelScopeModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", m.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", m.Name()) } func (m *ModelScopeModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, asrConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", m.Name()) } func (m *ModelScopeModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", m.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", m.Name()) } func (m *ModelScopeModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", m.Name()) } func (m *ModelScopeModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", m.Name()) } // ListModels returns the model IDs exposed by ModelScope's OpenAI-compatible @@ -188,7 +188,7 @@ func (m *ModelScopeModel) ListModels(ctx context.Context, apiConfig *APIConfig) } func (m *ModelScopeModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", m.Name()) } func (m *ModelScopeModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -197,13 +197,13 @@ func (m *ModelScopeModel) CheckConnection(ctx context.Context, apiConfig *APICon } func (m *ModelScopeModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", m.Name()) } func (m *ModelScopeModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", m.Name()) } func (m *ModelScopeModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", m.Name()) } diff --git a/internal/entity/models/monkeyocrv2.go b/internal/entity/models/monkeyocrv2.go index 7c1a05e035..5f630f1390 100644 --- a/internal/entity/models/monkeyocrv2.go +++ b/internal/entity/models/monkeyocrv2.go @@ -95,5 +95,5 @@ func monkeyOCRv2BaseURLFromAPIKey(apiConfig *APIConfig) string { } func (m *MonkeyOCRv2Model) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", m.Name()) } diff --git a/internal/entity/models/moonshot.go b/internal/entity/models/moonshot.go index 891512a28b..7d91d67159 100644 --- a/internal/entity/models/moonshot.go +++ b/internal/entity/models/moonshot.go @@ -291,40 +291,40 @@ func (m *MoonshotModel) Rerank(ctx context.Context, modelName *string, request R // TranscribeAudio transcribe audio func (m *MoonshotModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", m.Name()) } func (m *MoonshotModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", m.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", m.Name()) } // AudioSpeech convert text to audio func (m *MoonshotModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", m.Name()) } func (m *MoonshotModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", m.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", m.Name()) } // OCRFile OCR file func (m *MoonshotModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", m.Name()) } // ParseFile parse file func (m *MoonshotModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", m.Name()) } func (m *MoonshotModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", m.Name()) } func (m *MoonshotModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", m.Name()) } func (m *MoonshotModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", m.Name()) } diff --git a/internal/entity/models/mws.go b/internal/entity/models/mws.go index 8aa7104f57..6490232481 100644 --- a/internal/entity/models/mws.go +++ b/internal/entity/models/mws.go @@ -321,5 +321,5 @@ func (m *MWSModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) er } func (m *MWSModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", m.Name()) } diff --git a/internal/entity/models/n1n.go b/internal/entity/models/n1n.go index d8196befe5..96d7f9bd3d 100644 --- a/internal/entity/models/n1n.go +++ b/internal/entity/models/n1n.go @@ -404,43 +404,43 @@ func (n *N1NModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) er } func (n *N1NModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", n.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", n.Name()) } func (n *N1NModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", n.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", n.Name()) } func (n *N1NModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", n.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", n.Name()) } func (n *N1NModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", n.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", n.Name()) } func (n *N1NModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", n.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", n.Name()) } // OCRFile is not exposed by the n1n.ai API. func (n *N1NModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", n.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", n.Name()) } // ParseFile is not exposed by the n1n.ai API. func (n *N1NModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", n.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", n.Name()) } func (n *N1NModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", n.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", n.Name()) } func (n *N1NModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", n.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", n.Name()) } func (n *N1NModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", n.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", n.Name()) } diff --git a/internal/entity/models/novita.go b/internal/entity/models/novita.go index 7161687a14..dac7d631e4 100644 --- a/internal/entity/models/novita.go +++ b/internal/entity/models/novita.go @@ -647,39 +647,39 @@ func (n *NovitaModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[st } func (n *NovitaModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", n.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", n.Name()) } func (n *NovitaModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", n.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", n.Name()) } func (n *NovitaModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", n.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", n.Name()) } func (n *NovitaModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", n.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", n.Name()) } // OCRFile OCR file func (n *NovitaModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", n.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", n.Name()) } // ParseFile parse file func (n *NovitaModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", n.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", n.Name()) } func (n *NovitaModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", n.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", n.Name()) } func (n *NovitaModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", n.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", n.Name()) } func (n *NovitaModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", n.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", n.Name()) } diff --git a/internal/entity/models/nvidia.go b/internal/entity/models/nvidia.go index 9bd978f5cd..49be2fe207 100644 --- a/internal/entity/models/nvidia.go +++ b/internal/entity/models/nvidia.go @@ -363,30 +363,30 @@ func (n *NvidiaModel) Rerank(ctx context.Context, modelName *string, request Rer // TranscribeAudio transcribe audio func (n *NvidiaModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", n.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", n.Name()) } func (n *NvidiaModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", n.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", n.Name()) } // AudioSpeech convert text to audio func (n *NvidiaModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", n.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", n.Name()) } func (n *NvidiaModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", n.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", n.Name()) } // OCRFile OCR file func (n *NvidiaModel) OCRFile(ctx context.Context, modelName *string, content []byte, baseURL *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", n.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", n.Name()) } // ParseFile parse file func (n *NvidiaModel) ParseFile(ctx context.Context, modelName *string, content []byte, baseURL *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", n.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", n.Name()) } // ListModels calls /v1/models on the configured NVIDIA NIM base URL @@ -736,7 +736,7 @@ func parseNvidiaModelList(modelList ModelList, provider *Provider) []ListModelRe } func (n *NvidiaModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Balance", n.Name()) } // CheckConnection verifies that the configured NVIDIA NIM base URL @@ -749,13 +749,13 @@ func (n *NvidiaModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) } func (n *NvidiaModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", n.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", n.Name()) } func (n *NvidiaModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", n.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", n.Name()) } func (n *NvidiaModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", n.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", n.Name()) } diff --git a/internal/entity/models/ollama.go b/internal/entity/models/ollama.go index 491d259f67..0c4eb5ecc3 100644 --- a/internal/entity/models/ollama.go +++ b/internal/entity/models/ollama.go @@ -414,35 +414,35 @@ func (o *OllamaModel) Embed(ctx context.Context, modelName *string, request Embe } func (o *OllamaModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Rerank", o.Name()) } // TranscribeAudio transcribe audio func (o *OllamaModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", o.Name()) } func (o *OllamaModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", o.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", o.Name()) } // AudioSpeech convert text to audio func (o *OllamaModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", o.Name()) } func (o *OllamaModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", o.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", o.Name()) } // OCRFile OCR file func (o *OllamaModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", o.Name()) } // ParseFile parse file func (o *OllamaModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", o.Name()) } func (o *OllamaModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { @@ -513,7 +513,7 @@ func (o *OllamaModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]L } func (o *OllamaModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Balance", o.Name()) } // CheckConnection verifies that the configured Ollama base URL is reachable @@ -523,13 +523,13 @@ func (o *OllamaModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) } func (o *OllamaModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", o.Name()) } func (o *OllamaModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", o.Name()) } func (o *OllamaModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", o.Name()) } diff --git a/internal/entity/models/openai.go b/internal/entity/models/openai.go index 7590a0ad5b..41806c6073 100644 --- a/internal/entity/models/openai.go +++ b/internal/entity/models/openai.go @@ -295,7 +295,7 @@ func (o *OpenAIModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]L // Balance is not exposed by the OpenAI API, so this returns "no such method". func (o *OpenAIModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Balance", o.Name()) } // CheckConnection runs a lightweight ListModels call to verify the API key. @@ -739,22 +739,22 @@ func writeOpenAIMultipartField(writer *multipart.Writer, key string, value inter // OCRFile OCR file func (o *OpenAIModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", o.Name()) } // ParseFile parse file func (o *OpenAIModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", o.Name()) } func (o *OpenAIModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", o.Name()) } func (o *OpenAIModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", o.Name()) } func (o *OpenAIModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", o.Name()) } diff --git a/internal/entity/models/openai_api_compatible.go b/internal/entity/models/openai_api_compatible.go index f16d30c89d..1d5a3b2d55 100644 --- a/internal/entity/models/openai_api_compatible.go +++ b/internal/entity/models/openai_api_compatible.go @@ -343,5 +343,5 @@ func (m *OpenAIAPICompatibleModel) TranscribeAudioWithSender(ctx context.Context } func (m *OpenAIAPICompatibleModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", m.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", m.Name()) } diff --git a/internal/entity/models/openrouter.go b/internal/entity/models/openrouter.go index 2bad603068..c2129960ba 100644 --- a/internal/entity/models/openrouter.go +++ b/internal/entity/models/openrouter.go @@ -432,7 +432,7 @@ func (o *OpenRouterModel) TranscribeAudio(ctx context.Context, modelName *string } func (o *OpenRouterModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", o.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", o.Name()) } // AudioSpeech convert text to audio @@ -499,17 +499,17 @@ func (o *OpenRouterModel) AudioSpeech(ctx context.Context, modelName *string, au } func (o *OpenRouterModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", o.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", o.Name()) } // OCRFile OCR file func (o *OpenRouterModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", o.Name()) } // ParseFile parse file func (o *OpenRouterModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", o.Name()) } func (o *OpenRouterModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { @@ -632,13 +632,13 @@ func (o *OpenRouterModel) CheckConnection(ctx context.Context, apiConfig *APICon } func (o *OpenRouterModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", o.Name()) } func (o *OpenRouterModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", o.Name()) } func (o *OpenRouterModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", o.Name()) } diff --git a/internal/entity/models/orcarouter.go b/internal/entity/models/orcarouter.go index 06dd4e8728..be839327e9 100644 --- a/internal/entity/models/orcarouter.go +++ b/internal/entity/models/orcarouter.go @@ -105,19 +105,19 @@ func (o *OrcaRouterModel) ChatStreamlyWithSender(ctx context.Context, modelName } func (o *OrcaRouterModel) Embed(ctx context.Context, modelName *string, request EmbedRequest, apiConfig *APIConfig, embeddingConfig *EmbeddingConfig, modelUsage *common.ModelUsage) ([]EmbeddingData, error) { - return nil, fmt.Errorf("%s no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: Embed", o.Name()) } func (o *OrcaRouterModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("%s no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", o.Name()) } func (o *OrcaRouterModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", o.Name()) } func (o *OrcaRouterModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s no such method", o.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", o.Name()) } func (o *OrcaRouterModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { @@ -184,15 +184,15 @@ func (o *OrcaRouterModel) AudioSpeech(ctx context.Context, modelName *string, au } func (o *OrcaRouterModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s no such method", o.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", o.Name()) } func (o *OrcaRouterModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", o.Name()) } func (o *OrcaRouterModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", o.Name()) } func (o *OrcaRouterModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { @@ -251,7 +251,7 @@ func (o *OrcaRouterModel) ListModels(ctx context.Context, apiConfig *APIConfig) } func (o *OrcaRouterModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", o.Name()) } func (o *OrcaRouterModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -260,13 +260,13 @@ func (o *OrcaRouterModel) CheckConnection(ctx context.Context, apiConfig *APICon } func (o *OrcaRouterModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", o.Name()) } func (o *OrcaRouterModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", o.Name()) } func (o *OrcaRouterModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", o.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", o.Name()) } diff --git a/internal/entity/models/paddleocr.go b/internal/entity/models/paddleocr.go index 2b45811baf..bb2b1c5dd7 100644 --- a/internal/entity/models/paddleocr.go +++ b/internal/entity/models/paddleocr.go @@ -56,35 +56,35 @@ func (p *PaddleOCRModel) Name() string { } func (p *PaddleOCRModel) ChatWithMessages(ctx context.Context, modelName string, messages []Message, apiConfig *APIConfig, chatModelConfig *ChatConfig, modelUsage *common.ModelUsage) (*ChatResponse, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: ChatWithMessages", p.Name()) } func (p *PaddleOCRModel) ChatStreamlyWithSender(ctx context.Context, modelName string, messages []Message, apiConfig *APIConfig, modelConfig *ChatConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", p.Name()) + return fmt.Errorf("%s: no such method: ChatStreamlyWithSender", p.Name()) } func (p *PaddleOCRModel) Embed(ctx context.Context, modelName *string, request EmbedRequest, apiConfig *APIConfig, embeddingConfig *EmbeddingConfig, modelUsage *common.ModelUsage) ([]EmbeddingData, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: Embed", p.Name()) } func (p *PaddleOCRModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", p.Name()) } func (p *PaddleOCRModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", p.Name()) } func (p *PaddleOCRModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", p.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", p.Name()) } func (p *PaddleOCRModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", p.Name()) } func (p *PaddleOCRModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", p.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", p.Name()) } type paddleSubmitResponse struct { @@ -424,27 +424,27 @@ func paddleOCRUploadFilename(content []byte) string { } func (p *PaddleOCRModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", p.Name()) } func (p *PaddleOCRModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: ListModels", p.Name()) } func (p *PaddleOCRModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", p.Name()) } func (p *PaddleOCRModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { - return fmt.Errorf("%s, no such method", p.Name()) + return fmt.Errorf("%s: no such method: CheckConnection", p.Name()) } func (p *PaddleOCRModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", p.Name()) } func (p *PaddleOCRModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", p.Name()) } // paddleOCRConfigFromAPIKey parses the tenant PaddleOCR api_key payload the @@ -538,5 +538,5 @@ func paddleOCRAlgorithm(ocrConfig *OCRConfig, apiConfig *APIConfig) string { } func (p *PaddleOCRModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", p.Name()) } diff --git a/internal/entity/models/paddleocr_local.go b/internal/entity/models/paddleocr_local.go index e460cce8aa..57128ed5e1 100644 --- a/internal/entity/models/paddleocr_local.go +++ b/internal/entity/models/paddleocr_local.go @@ -54,35 +54,35 @@ func (p *PaddleOCRLocalModel) Name() string { } func (p *PaddleOCRLocalModel) ChatWithMessages(ctx context.Context, modelName string, messages []Message, apiConfig *APIConfig, chatModelConfig *ChatConfig, modelUsage *common.ModelUsage) (*ChatResponse, error) { - return nil, fmt.Errorf("%s no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: ChatWithMessages", p.Name()) } func (p *PaddleOCRLocalModel) ChatStreamlyWithSender(ctx context.Context, modelName string, messages []Message, apiConfig *APIConfig, modelConfig *ChatConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s no such method", p.Name()) + return fmt.Errorf("%s: no such method: ChatStreamlyWithSender", p.Name()) } func (p *PaddleOCRLocalModel) Embed(ctx context.Context, modelName *string, request EmbedRequest, apiConfig *APIConfig, embeddingConfig *EmbeddingConfig, modelUsage *common.ModelUsage) ([]EmbeddingData, error) { - return nil, fmt.Errorf("%s no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: Embed", p.Name()) } func (p *PaddleOCRLocalModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("%s no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", p.Name()) } func (p *PaddleOCRLocalModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", p.Name()) } func (p *PaddleOCRLocalModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s no such method", p.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", p.Name()) } func (p *PaddleOCRLocalModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", p.Name()) } func (p *PaddleOCRLocalModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s no such method", p.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", p.Name()) } func (p *PaddleOCRLocalModel) OCRFile(ctx context.Context, modelName *string, content []byte, fileURL *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { @@ -183,7 +183,7 @@ func (p *PaddleOCRLocalModel) OCRFile(ctx context.Context, modelName *string, co } func (p *PaddleOCRLocalModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", p.Name()) } func (p *PaddleOCRLocalModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { @@ -214,21 +214,21 @@ func (p *PaddleOCRLocalModel) ListModels(ctx context.Context, apiConfig *APIConf } func (p *PaddleOCRLocalModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", p.Name()) } func (p *PaddleOCRLocalModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { - return fmt.Errorf("%s no such method", p.Name()) + return fmt.Errorf("%s: no such method: CheckConnection", p.Name()) } func (p *PaddleOCRLocalModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", p.Name()) } func (p *PaddleOCRLocalModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", p.Name()) } func (p *PaddleOCRLocalModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", p.Name()) } diff --git a/internal/entity/models/perplexity.go b/internal/entity/models/perplexity.go index 520296a583..034e29e57c 100644 --- a/internal/entity/models/perplexity.go +++ b/internal/entity/models/perplexity.go @@ -269,45 +269,45 @@ func (p *PerplexityModel) Embed(ctx context.Context, modelName *string, request } func (p *PerplexityModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", p.Name()) } func (p *PerplexityModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", p.Name()) } func (p *PerplexityModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", p.Name()) } func (p *PerplexityModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", p.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", p.Name()) } func (p *PerplexityModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", p.Name()) } func (p *PerplexityModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", p.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", p.Name()) } func (p *PerplexityModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", p.Name()) } func (p *PerplexityModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", p.Name()) } func (p *PerplexityModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", p.Name()) } func (p *PerplexityModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", p.Name()) } func (p *PerplexityModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", p.Name()) } diff --git a/internal/entity/models/ppio.go b/internal/entity/models/ppio.go index 1f357442ca..4e0f02a30b 100644 --- a/internal/entity/models/ppio.go +++ b/internal/entity/models/ppio.go @@ -377,41 +377,41 @@ func (p *PPIOModel) Rerank(ctx context.Context, modelName *string, request Reran } func (p *PPIOModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", p.Name()) } func (p *PPIOModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", p.Name()) } func (p *PPIOModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", p.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", p.Name()) } func (p *PPIOModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", p.Name()) } func (p *PPIOModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", p.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", p.Name()) } func (p *PPIOModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", p.Name()) } func (p *PPIOModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", p.Name()) } func (p *PPIOModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", p.Name()) } func (p *PPIOModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", p.Name()) } func (p *PPIOModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", p.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", p.Name()) } diff --git a/internal/entity/models/qiniu.go b/internal/entity/models/qiniu.go index 4e0e416482..324cc470a8 100644 --- a/internal/entity/models/qiniu.go +++ b/internal/entity/models/qiniu.go @@ -194,35 +194,35 @@ func (q *QiniuModel) ChatStreamlyWithSender(ctx context.Context, modelName strin } func (q *QiniuModel) Embed(ctx context.Context, modelName *string, request EmbedRequest, apiConfig *APIConfig, embeddingConfig *EmbeddingConfig, modelUsage *common.ModelUsage) ([]EmbeddingData, error) { - return nil, fmt.Errorf("%s, no such method", q.Name()) + return nil, fmt.Errorf("%s: no such method: Embed", q.Name()) } func (q *QiniuModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("%s, no such method", q.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", q.Name()) } func (q *QiniuModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", q.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", q.Name()) } func (q *QiniuModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", q.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", q.Name()) } func (q *QiniuModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", q.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", q.Name()) } func (q *QiniuModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", q.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", q.Name()) } func (q *QiniuModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", q.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", q.Name()) } func (q *QiniuModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", q.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", q.Name()) } func (q *QiniuModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { @@ -273,7 +273,7 @@ func (q *QiniuModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]Li } func (q *QiniuModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", q.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", q.Name()) } func (q *QiniuModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -285,13 +285,13 @@ func (q *QiniuModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) } func (q *QiniuModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", q.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", q.Name()) } func (q *QiniuModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", q.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", q.Name()) } func (q *QiniuModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", q.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", q.Name()) } diff --git a/internal/entity/models/ragcon.go b/internal/entity/models/ragcon.go index c7f8a107f0..16fad9d42f 100644 --- a/internal/entity/models/ragcon.go +++ b/internal/entity/models/ragcon.go @@ -330,7 +330,7 @@ func (r *RAGconModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) // Balance is not exposed by RAGcon's LiteLLM proxy. func (r *RAGconModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", r.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", r.Name()) } func (r *RAGconModel) newASRRequest(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, stream bool) (*http.Request, string, error) { @@ -622,22 +622,22 @@ func (r *RAGconModel) AudioSpeechWithSender(ctx context.Context, modelName *stri // OCRFile is not offered by RAGcon. func (r *RAGconModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", r.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", r.Name()) } // ParseFile is not offered by RAGcon. func (r *RAGconModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", r.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", r.Name()) } func (r *RAGconModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", r.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", r.Name()) } func (r *RAGconModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", r.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", r.Name()) } func (r *RAGconModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", r.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", r.Name()) } diff --git a/internal/entity/models/replicate.go b/internal/entity/models/replicate.go index 7cc6e7a7a4..ca70f79a44 100644 --- a/internal/entity/models/replicate.go +++ b/internal/entity/models/replicate.go @@ -827,41 +827,41 @@ func (r *ReplicateModel) Rerank(ctx context.Context, modelName *string, request } func (r *ReplicateModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", r.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", r.Name()) } func (r *ReplicateModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", r.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", r.Name()) } func (r *ReplicateModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", r.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", r.Name()) } func (r *ReplicateModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", r.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", r.Name()) } func (r *ReplicateModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", r.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", r.Name()) } func (r *ReplicateModel) OCRFile(ctx context.Context, modelName *string, content []byte, baseURL *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", r.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", r.Name()) } func (r *ReplicateModel) ParseFile(ctx context.Context, modelName *string, content []byte, baseURL *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", r.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", r.Name()) } func (r *ReplicateModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", r.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", r.Name()) } func (r *ReplicateModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", r.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", r.Name()) } func (r *ReplicateModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", r.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", r.Name()) } diff --git a/internal/entity/models/siliconflow.go b/internal/entity/models/siliconflow.go index 6c4f0febcb..9d43e9fc5a 100644 --- a/internal/entity/models/siliconflow.go +++ b/internal/entity/models/siliconflow.go @@ -623,7 +623,7 @@ func (s *SiliconflowModel) TranscribeAudio(ctx context.Context, modelName *strin } func (s *SiliconflowModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", s.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", s.Name()) } // siliconflowTTSRequestBody mirrors rag/llm/tts_model.py SILICONFLOWTTS._build_payload: @@ -767,22 +767,22 @@ func (s *SiliconflowModel) AudioSpeechWithSender(ctx context.Context, modelName // OCRFile OCR file func (s *SiliconflowModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", s.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", s.Name()) } // ParseFile parse file func (s *SiliconflowModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", s.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", s.Name()) } func (s *SiliconflowModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", s.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", s.Name()) } func (s *SiliconflowModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", s.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", s.Name()) } func (s *SiliconflowModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", s.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", s.Name()) } diff --git a/internal/entity/models/somark.go b/internal/entity/models/somark.go index d73e40ca0b..2b4261e2cd 100644 --- a/internal/entity/models/somark.go +++ b/internal/entity/models/somark.go @@ -73,39 +73,39 @@ func (s *SoMarkModel) GetBaseURL(apiConfig *APIConfig) (string, error) { } func (s *SoMarkModel) ChatWithMessages(ctx context.Context, modelName string, messages []Message, apiConfig *APIConfig, chatModelConfig *ChatConfig, modelUsage *common.ModelUsage) (*ChatResponse, error) { - return nil, fmt.Errorf("%s, no such method", s.Name()) + return nil, fmt.Errorf("%s: no such method: ChatWithMessages", s.Name()) } func (s *SoMarkModel) ChatStreamlyWithSender(ctx context.Context, modelName string, messages []Message, apiConfig *APIConfig, modelConfig *ChatConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", s.Name()) + return fmt.Errorf("%s: no such method: ChatStreamlyWithSender", s.Name()) } func (s *SoMarkModel) Embed(ctx context.Context, modelName *string, request EmbedRequest, apiConfig *APIConfig, embeddingConfig *EmbeddingConfig, modelUsage *common.ModelUsage) ([]EmbeddingData, error) { - return nil, fmt.Errorf("%s, no such method", s.Name()) + return nil, fmt.Errorf("%s: no such method: Embed", s.Name()) } func (s *SoMarkModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("%s, no such method", s.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", s.Name()) } func (s *SoMarkModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", s.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", s.Name()) } func (s *SoMarkModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", s.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", s.Name()) } func (s *SoMarkModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", s.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", s.Name()) } func (s *SoMarkModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", s.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", s.Name()) } func (s *SoMarkModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", s.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", s.Name()) } type soMarkSubmitResponse struct { @@ -418,25 +418,25 @@ func (s *SoMarkModel) OCRFile(ctx context.Context, modelName *string, content [] } func (s *SoMarkModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", s.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", s.Name()) } func (s *SoMarkModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { - return nil, fmt.Errorf("%s, no such method", s.Name()) + return nil, fmt.Errorf("%s: no such method: ListModels", s.Name()) } func (s *SoMarkModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", s.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", s.Name()) } func (s *SoMarkModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { - return fmt.Errorf("%s, no such method", s.Name()) + return fmt.Errorf("%s: no such method: CheckConnection", s.Name()) } func (s *SoMarkModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", s.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", s.Name()) } func (s *SoMarkModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", s.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", s.Name()) } diff --git a/internal/entity/models/stepfun.go b/internal/entity/models/stepfun.go index ecd86e0a8e..f41b5e4411 100644 --- a/internal/entity/models/stepfun.go +++ b/internal/entity/models/stepfun.go @@ -158,7 +158,7 @@ func (s *StepFunModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([] // Balance is not exposed by the StepFun API, so this returns "no such method". func (s *StepFunModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Balance", s.Name()) } // CheckConnection runs a lightweight ListModels call to verify the API key. @@ -173,16 +173,16 @@ func (s *StepFunModel) CheckConnection(ctx context.Context, apiConfig *APIConfig // Rerank calculates similarity scores between query and documents. StepFun // does not expose a public rerank API, so this returns "no such method". func (s *StepFunModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Rerank", s.Name()) } // TranscribeAudio transcribe audio func (s *StepFunModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", s.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", s.Name()) } func (s *StepFunModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", s.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", s.Name()) } // AudioSpeech convert text to audio @@ -341,22 +341,22 @@ func (s *StepFunModel) AudioSpeechWithSender(ctx context.Context, modelName *str // OCRFile OCR file func (s *StepFunModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", s.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", s.Name()) } // ParseFile parse file func (s *StepFunModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", s.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", s.Name()) } func (s *StepFunModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", s.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", s.Name()) } func (s *StepFunModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", s.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", s.Name()) } func (s *StepFunModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", s.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", s.Name()) } diff --git a/internal/entity/models/togetherai.go b/internal/entity/models/togetherai.go index 8329d20d9b..65d22bc0c4 100644 --- a/internal/entity/models/togetherai.go +++ b/internal/entity/models/togetherai.go @@ -366,7 +366,7 @@ func (t *TogetherAIModel) Rerank(ctx context.Context, modelName *string, request } func (t *TogetherAIModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", t.Name()) } func (t *TogetherAIModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { @@ -472,7 +472,7 @@ func (t *TogetherAIModel) TranscribeAudio(ctx context.Context, modelName *string } func (t *TogetherAIModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", t.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", t.Name()) } func (t *TogetherAIModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { @@ -629,21 +629,21 @@ func (t *TogetherAIModel) AudioSpeechWithSender(ctx context.Context, modelName * } func (t *TogetherAIModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", t.Name()) } func (t *TogetherAIModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", t.Name()) } func (t *TogetherAIModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", t.Name()) } func (t *TogetherAIModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", t.Name()) } func (t *TogetherAIModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", t.Name()) } diff --git a/internal/entity/models/tokenhub.go b/internal/entity/models/tokenhub.go index 60a0961313..4cab281cf0 100644 --- a/internal/entity/models/tokenhub.go +++ b/internal/entity/models/tokenhub.go @@ -188,31 +188,31 @@ func (t *TokenHubModel) Embed(ctx context.Context, modelName *string, request Em } func (t *TokenHubModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("%s no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", t.Name()) } func (t *TokenHubModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", t.Name()) } func (t *TokenHubModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s no such method", t.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", t.Name()) } func (t *TokenHubModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", t.Name()) } func (t *TokenHubModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s no such method", t.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", t.Name()) } func (t *TokenHubModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", t.Name()) } func (t *TokenHubModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", t.Name()) } func (t *TokenHubModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { @@ -282,7 +282,7 @@ func (t *TokenHubModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([ } func (t *TokenHubModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", t.Name()) } func (t *TokenHubModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -291,13 +291,13 @@ func (t *TokenHubModel) CheckConnection(ctx context.Context, apiConfig *APIConfi } func (t *TokenHubModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", t.Name()) } func (t *TokenHubModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", t.Name()) } func (t *TokenHubModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", t.Name()) } diff --git a/internal/entity/models/tokenpony.go b/internal/entity/models/tokenpony.go index 2b0f11151c..7cad151678 100644 --- a/internal/entity/models/tokenpony.go +++ b/internal/entity/models/tokenpony.go @@ -152,49 +152,49 @@ func (t *TokenPonyModel) CheckConnection(ctx context.Context, apiConfig *APIConf } func (t *TokenPonyModel) Embed(ctx context.Context, modelName *string, request EmbedRequest, apiConfig *APIConfig, embeddingConfig *EmbeddingConfig, modelUsage *common.ModelUsage) ([]EmbeddingData, error) { - return nil, fmt.Errorf("%s, no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: Embed", t.Name()) } func (t *TokenPonyModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("%s, no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", t.Name()) } func (t *TokenPonyModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", t.Name()) } func (t *TokenPonyModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", t.Name()) } func (t *TokenPonyModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", t.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", t.Name()) } func (t *TokenPonyModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", t.Name()) } func (t *TokenPonyModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", t.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", t.Name()) } func (t *TokenPonyModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", t.Name()) } func (t *TokenPonyModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", t.Name()) } func (t *TokenPonyModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", t.Name()) } func (t *TokenPonyModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", t.Name()) } func (t *TokenPonyModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", t.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", t.Name()) } diff --git a/internal/entity/models/upstage.go b/internal/entity/models/upstage.go index 6ec5c1df55..df5de7e9df 100644 --- a/internal/entity/models/upstage.go +++ b/internal/entity/models/upstage.go @@ -264,7 +264,7 @@ func (u *UpstageModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([] // Balance is not exposed by the Upstage API, so this returns "no such method". func (u *UpstageModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Balance", u.Name()) } // CheckConnection runs a lightweight ListModels call to verify the API key. @@ -279,45 +279,45 @@ func (u *UpstageModel) CheckConnection(ctx context.Context, apiConfig *APIConfig // Rerank calculates similarity scores between query and documents. Upstage // does not expose a public rerank API, so this returns "no such method". func (u *UpstageModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Rerank", u.Name()) } // TranscribeAudio transcribe audio func (u *UpstageModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", u.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", u.Name()) } func (u *UpstageModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", u.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", u.Name()) } // AudioSpeech convert text to audio func (u *UpstageModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", u.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", u.Name()) } func (u *UpstageModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", u.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", u.Name()) } // OCRFile OCR file func (u *UpstageModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", u.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", u.Name()) } // ParseFile parse file func (u *UpstageModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", u.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", u.Name()) } func (u *UpstageModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", u.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", u.Name()) } func (u *UpstageModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", u.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", u.Name()) } func (u *UpstageModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", u.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", u.Name()) } diff --git a/internal/entity/models/vllm.go b/internal/entity/models/vllm.go index d1c69b70fd..bb32772fde 100644 --- a/internal/entity/models/vllm.go +++ b/internal/entity/models/vllm.go @@ -327,7 +327,7 @@ func (v *VllmModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]Lis } func (v *VllmModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Balance", v.Name()) } // CheckConnection verifies that the configured vLLM base URL is reachable @@ -472,40 +472,40 @@ func (v *VllmModel) Rerank(ctx context.Context, modelName *string, request Reran // TranscribeAudio transcribe audio func (v *VllmModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", v.Name()) } func (v *VllmModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", v.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", v.Name()) } // AudioSpeech convert text to audio func (v *VllmModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", v.Name()) } func (v *VllmModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", v.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", v.Name()) } // OCRFile OCR file func (v *VllmModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", v.Name()) } // ParseFile parse file func (v *VllmModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", v.Name()) } func (v *VllmModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", v.Name()) } func (v *VllmModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", v.Name()) } func (v *VllmModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", v.Name()) } diff --git a/internal/entity/models/volcengine.go b/internal/entity/models/volcengine.go index 2d1c29dfc8..d09cde5800 100644 --- a/internal/entity/models/volcengine.go +++ b/internal/entity/models/volcengine.go @@ -364,30 +364,30 @@ func (v *VolcEngine) Rerank(ctx context.Context, modelName *string, request Rera // TranscribeAudio transcribe audio func (v *VolcEngine) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", v.Name()) } func (v *VolcEngine) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", v.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", v.Name()) } // AudioSpeech convert text to audio func (v *VolcEngine) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", v.Name()) } func (v *VolcEngine) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", v.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", v.Name()) } // OCRFile OCR file func (v *VolcEngine) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", v.Name()) } // ParseFile parse file func (v *VolcEngine) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", v.Name()) } // volcengineModelData is a VolcEngine-specific model list item with @@ -545,7 +545,7 @@ func (v *VolcEngine) ListModels(ctx context.Context, apiConfig *APIConfig) ([]Li } func (v *VolcEngine) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", v.Name()) } func (v *VolcEngine) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -588,13 +588,13 @@ func (v *VolcEngine) CheckConnection(ctx context.Context, apiConfig *APIConfig) } func (v *VolcEngine) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", v.Name()) } func (v *VolcEngine) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", v.Name()) } func (v *VolcEngine) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", v.Name()) } diff --git a/internal/entity/models/voyage.go b/internal/entity/models/voyage.go index 40a18d6cac..a6ffafe353 100644 --- a/internal/entity/models/voyage.go +++ b/internal/entity/models/voyage.go @@ -259,62 +259,62 @@ func (v *VoyageModel) Rerank(ctx context.Context, modelName *string, request Rer } func (v *VoyageModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: ListModels", v.Name()) } func (v *VoyageModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { - return fmt.Errorf("%s, no such method", v.Name()) + return fmt.Errorf("%s: no such method: CheckConnection", v.Name()) } // ChatWithMessages is not exposed by the Voyage AI API. func (v *VoyageModel) ChatWithMessages(ctx context.Context, modelName string, messages []Message, apiConfig *APIConfig, chatModelConfig *ChatConfig, modelUsage *common.ModelUsage) (*ChatResponse, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: ChatWithMessages", v.Name()) } func (v *VoyageModel) ChatStreamlyWithSender(ctx context.Context, modelName string, messages []Message, apiConfig *APIConfig, modelConfig *ChatConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", v.Name()) + return fmt.Errorf("%s: no such method: ChatStreamlyWithSender", v.Name()) } // Balance is not exposed by the Voyage AI API. func (v *VoyageModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", v.Name()) } // TranscribeAudio / AudioSpeech / OCRFile: Voyage does not host any of // these surfaces. func (v *VoyageModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", v.Name()) } func (v *VoyageModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", v.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", v.Name()) } func (v *VoyageModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", v.Name()) } func (v *VoyageModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", v.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", v.Name()) } func (v *VoyageModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", v.Name()) } // ParseFile parse file func (v *VoyageModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", v.Name()) } func (v *VoyageModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", v.Name()) } func (v *VoyageModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", v.Name()) } func (v *VoyageModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", v.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", v.Name()) } diff --git a/internal/entity/models/xai.go b/internal/entity/models/xai.go index df64124c94..a837138b46 100644 --- a/internal/entity/models/xai.go +++ b/internal/entity/models/xai.go @@ -150,7 +150,7 @@ func (x *XAIModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]List // Balance is not exposed by the xAI API, so this returns "no such method". func (x *XAIModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("no such method") + return nil, fmt.Errorf("%s: no such method: Balance", x.Name()) } // CheckConnection runs a lightweight ListModels call to verify the API key. @@ -297,7 +297,7 @@ func (x *XAIModel) TranscribeAudio(ctx context.Context, modelName *string, file } func (x *XAIModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", x.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", x.Name()) } // AudioSpeech convert text to audio @@ -363,27 +363,27 @@ func (x *XAIModel) AudioSpeech(ctx context.Context, modelName *string, audioCont } func (x *XAIModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", x.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", x.Name()) } // OCRFile OCR file func (x *XAIModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", x.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", x.Name()) } // ParseFile parse file func (x *XAIModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", x.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", x.Name()) } func (x *XAIModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", x.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", x.Name()) } func (x *XAIModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", x.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", x.Name()) } func (x *XAIModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", x.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", x.Name()) } diff --git a/internal/entity/models/xiaomi.go b/internal/entity/models/xiaomi.go index a9cea6775f..cbcfa67c69 100644 --- a/internal/entity/models/xiaomi.go +++ b/internal/entity/models/xiaomi.go @@ -151,11 +151,11 @@ func (x *XiaomiModel) ChatStreamlyWithSender(ctx context.Context, modelName stri } func (x *XiaomiModel) Embed(ctx context.Context, modelName *string, request EmbedRequest, apiConfig *APIConfig, embeddingConfig *EmbeddingConfig, modelUsage *common.ModelUsage) ([]EmbeddingData, error) { - return nil, fmt.Errorf("no such method %s", x.Name()) + return nil, fmt.Errorf("%s: no such method: Embed", x.Name()) } func (x *XiaomiModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("no such method %s", x.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", x.Name()) } func (x *XiaomiModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { @@ -596,11 +596,11 @@ func decodeXiaomiAudioData(data string) ([]byte, error) { } func (x *XiaomiModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("no such method %s", x.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", x.Name()) } func (x *XiaomiModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("no such method %s", x.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", x.Name()) } func (x *XiaomiModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { @@ -634,7 +634,7 @@ func (x *XiaomiModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]L } func (x *XiaomiModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("no such method %s", x.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", x.Name()) } func (x *XiaomiModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -643,13 +643,13 @@ func (x *XiaomiModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) } func (x *XiaomiModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("no such method %s", x.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", x.Name()) } func (x *XiaomiModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("no such method %s", x.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", x.Name()) } func (x *XiaomiModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", x.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", x.Name()) } diff --git a/internal/entity/models/xinference.go b/internal/entity/models/xinference.go index b27a125cb2..174f703bc8 100644 --- a/internal/entity/models/xinference.go +++ b/internal/entity/models/xinference.go @@ -429,7 +429,7 @@ func (x *XinferenceModel) TranscribeAudio(ctx context.Context, modelName *string } func (x *XinferenceModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", x.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", x.Name()) } func (x *XinferenceModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { @@ -494,15 +494,15 @@ func (x *XinferenceModel) AudioSpeech(ctx context.Context, modelName *string, au } func (x *XinferenceModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", x.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", x.Name()) } func (x *XinferenceModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", x.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", x.Name()) } func (x *XinferenceModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", x.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", x.Name()) } // ListModels returns the model IDs exposed by Xinference's OpenAI-compatible @@ -553,7 +553,7 @@ func (x *XinferenceModel) ListModels(ctx context.Context, apiConfig *APIConfig) } func (x *XinferenceModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", x.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", x.Name()) } func (x *XinferenceModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -562,13 +562,13 @@ func (x *XinferenceModel) CheckConnection(ctx context.Context, apiConfig *APICon } func (x *XinferenceModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", x.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", x.Name()) } func (x *XinferenceModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", x.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", x.Name()) } func (x *XinferenceModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", x.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", x.Name()) } diff --git a/internal/entity/models/xunfei.go b/internal/entity/models/xunfei.go index 4323a43935..05407ffaac 100644 --- a/internal/entity/models/xunfei.go +++ b/internal/entity/models/xunfei.go @@ -128,35 +128,35 @@ func (x *XunFeiModel) ChatStreamlyWithSender(ctx context.Context, modelName stri } func (x *XunFeiModel) Embed(ctx context.Context, modelName *string, request EmbedRequest, apiConfig *APIConfig, embeddingConfig *EmbeddingConfig, modelUsage *common.ModelUsage) ([]EmbeddingData, error) { - return nil, fmt.Errorf("%s, no such method", x.Name()) + return nil, fmt.Errorf("%s: no such method: Embed", x.Name()) } func (x *XunFeiModel) Rerank(ctx context.Context, modelName *string, request RerankRequest, apiConfig *APIConfig, rerankConfig *RerankConfig, modelUsage *common.ModelUsage) (*RerankResponse, error) { - return nil, fmt.Errorf("%s, no such method", x.Name()) + return nil, fmt.Errorf("%s: no such method: Rerank", x.Name()) } func (x *XunFeiModel) TranscribeAudio(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage) (*ASRResponse, error) { - return nil, fmt.Errorf("%s, no such method", x.Name()) + return nil, fmt.Errorf("%s: no such method: TranscribeAudio", x.Name()) } func (x *XunFeiModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", x.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", x.Name()) } func (x *XunFeiModel) AudioSpeech(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage) (*TTSResponse, error) { - return nil, fmt.Errorf("%s, no such method", x.Name()) + return nil, fmt.Errorf("%s: no such method: AudioSpeech", x.Name()) } func (x *XunFeiModel) AudioSpeechWithSender(ctx context.Context, modelName *string, audioContent *string, apiConfig *APIConfig, ttsConfig *TTSConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", x.Name()) + return fmt.Errorf("%s: no such method: AudioSpeechWithSender", x.Name()) } func (x *XunFeiModel) OCRFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig, modelUsage *common.ModelUsage) (*OCRFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", x.Name()) + return nil, fmt.Errorf("%s: no such method: OCRFile", x.Name()) } func (x *XunFeiModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", x.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", x.Name()) } func (x *XunFeiModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]ListModelResponse, error) { @@ -187,7 +187,7 @@ func (x *XunFeiModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([]L } func (x *XunFeiModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", x.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", x.Name()) } func (x *XunFeiModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -204,13 +204,13 @@ func (x *XunFeiModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) } func (x *XunFeiModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", x.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", x.Name()) } func (x *XunFeiModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", x.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", x.Name()) } func (x *XunFeiModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", x.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", x.Name()) } diff --git a/internal/entity/models/zhipu-ai.go b/internal/entity/models/zhipu-ai.go index d862b2f250..6753a2e41f 100644 --- a/internal/entity/models/zhipu-ai.go +++ b/internal/entity/models/zhipu-ai.go @@ -270,7 +270,7 @@ func (z *ZhipuAIModel) ListModels(ctx context.Context, apiConfig *APIConfig) ([] } func (z *ZhipuAIModel) Balance(ctx context.Context, apiConfig *APIConfig) (map[string]interface{}, error) { - return nil, fmt.Errorf("%s, no such method", z.Name()) + return nil, fmt.Errorf("%s: no such method: Balance", z.Name()) } func (z *ZhipuAIModel) CheckConnection(ctx context.Context, apiConfig *APIConfig) error { @@ -555,7 +555,7 @@ func writeZhipuASRField(writer *multipart.Writer, key string, value interface{}) } func (z *ZhipuAIModel) TranscribeAudioWithSender(ctx context.Context, modelName *string, file *string, apiConfig *APIConfig, asrConfig *ASRConfig, modelUsage *common.ModelUsage, sender func(*string, *string) error) error { - return fmt.Errorf("%s, no such method", z.Name()) + return fmt.Errorf("%s: no such method: TranscribeAudioWithSender", z.Name()) } // AudioSpeech convert text to audio @@ -782,17 +782,17 @@ func (z *ZhipuAIModel) OCRFile(ctx context.Context, modelName *string, content [ // ParseFile parse file func (z *ZhipuAIModel) ParseFile(ctx context.Context, modelName *string, content []byte, url *string, apiConfig *APIConfig, parseFileConfig *ParseFileConfig, modelUsage *common.ModelUsage) (*ParseFileResponse, error) { - return nil, fmt.Errorf("%s, no such method", z.Name()) + return nil, fmt.Errorf("%s: no such method: ParseFile", z.Name()) } func (z *ZhipuAIModel) ListTasks(ctx context.Context, apiConfig *APIConfig) ([]ListTaskStatus, error) { - return nil, fmt.Errorf("%s, no such method", z.Name()) + return nil, fmt.Errorf("%s: no such method: ListTasks", z.Name()) } func (z *ZhipuAIModel) ShowTask(ctx context.Context, taskID string, apiConfig *APIConfig) (*TaskResponse, error) { - return nil, fmt.Errorf("%s, no such method", z.Name()) + return nil, fmt.Errorf("%s: no such method: ShowTask", z.Name()) } func (z *ZhipuAIModel) Decide(ctx context.Context, modelName *string, request *DecideRequest, apiConfig *APIConfig, modelUsage *common.ModelUsage) (*DecideResponse, error) { - return nil, fmt.Errorf("%s, no such method", z.Name()) + return nil, fmt.Errorf("%s: no such method: Decide", z.Name()) }