feat(events): Add EventEmitter and instrument ai_client.py
This commit is contained in:
@@ -19,6 +19,7 @@ from pathlib import Path
|
||||
import file_cache
|
||||
import mcp_client
|
||||
import google.genai
|
||||
from events import EventEmitter
|
||||
|
||||
_provider: str = "gemini"
|
||||
_model: str = "gemini-2.5-flash"
|
||||
@@ -27,6 +28,9 @@ _max_tokens: int = 8192
|
||||
|
||||
_history_trunc_limit: int = 8000
|
||||
|
||||
# Global event emitter for API lifecycle events
|
||||
events = EventEmitter()
|
||||
|
||||
def set_model_params(temp: float, max_tok: int, trunc_limit: int = 8000):
|
||||
global _temperature, _max_tokens, _history_trunc_limit
|
||||
_temperature = temp
|
||||
|
||||
Reference in New Issue
Block a user