From 30d1c1dc28c6c478fcd38346e16ee30202035fa0 Mon Sep 17 00:00:00 2001 From: Jin Hai Date: Wed, 13 May 2026 20:05:56 +0800 Subject: [PATCH] Fix go compilation (#14900) ### What problem does this PR solve? As title ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) Signed-off-by: Jin Hai --- internal/entity/models/localai.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/internal/entity/models/localai.go b/internal/entity/models/localai.go index e53454f272..d47d40a91e 100644 --- a/internal/entity/models/localai.go +++ b/internal/entity/models/localai.go @@ -218,7 +218,6 @@ func (l *LocalAIModel) ChatWithMessages(modelName string, messages []Message, ap // addLocalAIReasoningRequestParams. addLocalAIReasoningRequestParams(reqBody, chatModelConfig) } - jsonData, err := json.Marshal(reqBody) if err != nil { return nil, fmt.Errorf("failed to marshal request: %w", err) @@ -818,8 +817,7 @@ func (l *LocalAIModel) AudioSpeechWithSender(modelName *string, audioContent *st return fmt.Errorf("%s, no such method", l.Name()) } -// OCRFile: LocalAI has no OCR pipeline in its OpenAI-compatible surface; -// document parsing belongs to a different interface entirely. -func (l *LocalAIModel) OCRFile(modelName *string, fileContent *string, apiConfig *APIConfig, ocrConfig *OCRConfig) (*OCRResponse, error) { - return nil, fmt.Errorf("%s, no such method", l.Name()) +// OCRFile OCR file +func (d *LocalAIModel) OCRFile(modelName *string, content []byte, url *string, apiConfig *APIConfig, ocrConfig *OCRConfig) (*OCRResponse, error) { + return nil, fmt.Errorf("%s, no such method", d.Name()) }