From 29845fcc4c2aa56c79d95e5db826b107ee60266f Mon Sep 17 00:00:00 2001 From: Raven95676 Date: Sat, 23 Aug 2025 14:14:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20Gemini=E6=B7=BB=E5=8A=A0=E5=AF=B9LLMRes?= =?UTF-8?q?ponse=E7=9A=84raw=5Fcompletion=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/provider/sources/gemini_source.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/astrbot/core/provider/sources/gemini_source.py b/astrbot/core/provider/sources/gemini_source.py index b04e619a8..e1d12623c 100644 --- a/astrbot/core/provider/sources/gemini_source.py +++ b/astrbot/core/provider/sources/gemini_source.py @@ -431,6 +431,7 @@ class ProviderGoogleGenAI(Provider): continue llm_response = LLMResponse("assistant") + llm_response.raw_completion = result llm_response.result_chain = self._process_content_parts(result, llm_response) return llm_response @@ -481,6 +482,7 @@ class ProviderGoogleGenAI(Provider): part.function_call for part in chunk.candidates[0].content.parts ): llm_response = LLMResponse("assistant", is_chunk=False) + llm_response.raw_completion = chunk llm_response.result_chain = self._process_content_parts( chunk, llm_response ) @@ -496,6 +498,7 @@ class ProviderGoogleGenAI(Provider): # Process the final chunk for potential tool calls or other content if chunk.candidates[0].content.parts: final_response = LLMResponse("assistant", is_chunk=False) + final_response.raw_completion = chunk final_response.result_chain = self._process_content_parts( chunk, final_response )