modify the structure of the large language model options in the configuration file

This commit is contained in:
MaysWind
2025-09-21 17:49:49 +08:00
parent d9cd270ff4
commit 118558d25b
16 changed files with 195 additions and 160 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ var (
// RecognizeReceiptImageHandler returns the recognized receipt image result
func (a *LargeLanguageModelsApi) RecognizeReceiptImageHandler(c *core.WebContext) (any, *errs.Error) {
if a.CurrentConfig().LLMProvider == "" || !a.CurrentConfig().TransactionFromAIImageRecognition {
if a.CurrentConfig().ReceiptImageRecognitionLLMConfig == nil || a.CurrentConfig().ReceiptImageRecognitionLLMConfig.LLMProvider == "" || !a.CurrentConfig().TransactionFromAIImageRecognition {
return nil, errs.ErrLargeLanguageModelProviderNotEnabled
}