more org
This commit is contained in:
@@ -189,18 +189,16 @@ class GeminiCliAdapter:
|
||||
self.last_latency = current_latency
|
||||
|
||||
return {
|
||||
"text": accumulated_text,
|
||||
"text": accumulated_text,
|
||||
"tool_calls": tool_calls,
|
||||
"stderr": stderr_final
|
||||
"stderr": stderr_final
|
||||
}
|
||||
|
||||
def count_tokens(self, contents: list[str]) -> int:
|
||||
"""
|
||||
|
||||
|
||||
Provides a character-based token estimation for the Gemini CLI.
|
||||
Uses 4 chars/token as a conservative average.
|
||||
[C: tests/test_gemini_cli_adapter_parity.py:TestGeminiCliAdapterParity.test_count_tokens_fallback]
|
||||
Provides a character-based token estimation for the Gemini CLI.
|
||||
Uses 4 chars/token as a conservative average.
|
||||
[C: tests/test_gemini_cli_adapter_parity.py:TestGeminiCliAdapterParity.test_count_tokens_fallback]
|
||||
"""
|
||||
total_chars = len("\n".join(contents))
|
||||
return total_chars // 4
|
||||
Reference in New Issue
Block a user