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.
This commit is contained in:
CalciumIon
2024-12-22 23:54:11 +08:00
parent 1d0ef89ce9
commit 241c9389ef

View File

@@ -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
}