From 241c9389ef15c36ab4f6ca86075d277e910b3022 Mon Sep 17 00:00:00 2001 From: CalciumIon <1808837298@qq.com> Date: Sun, 22 Dec 2024 23:54:11 +0800 Subject: [PATCH] refactor: Remove unused context and logging in CovertGemini2OpenAI function - Eliminated the unused `context` import and the logging of `geminiRequest` in the `CovertGemini2OpenAI` function, improving code cleanliness and reducing unnecessary overhead. - This change enhances the maintainability of the code by removing redundant elements that do not contribute to functionality. --- relay/channel/gemini/relay-gemini.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/relay/channel/gemini/relay-gemini.go b/relay/channel/gemini/relay-gemini.go index 7c557550..3791fd44 100644 --- a/relay/channel/gemini/relay-gemini.go +++ b/relay/channel/gemini/relay-gemini.go @@ -2,7 +2,6 @@ package gemini import ( "bufio" - "context" "encoding/json" "fmt" "io" @@ -190,7 +189,6 @@ func CovertGemini2OpenAI(textRequest dto.GeneralOpenAIRequest) (*GeminiChatReque } geminiRequest.Contents = append(geminiRequest.Contents, content) } - common.LogJson(context.Background(), "gemini_request", geminiRequest) return &geminiRequest, nil }