feat(token-tracking): attach usage hook to advisor's self-created LLM client
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -180,9 +180,10 @@ async def analyze(
|
||||
if client is None:
|
||||
from openai import AsyncOpenAI
|
||||
|
||||
from rag_eval.metrics.factory import resolve_openai_client_kwargs
|
||||
from rag_eval.metrics.factory import attach_usage_hook, resolve_openai_client_kwargs
|
||||
|
||||
client = AsyncOpenAI(**resolve_openai_client_kwargs(judge_model, settings))
|
||||
attach_usage_hook(client)
|
||||
owns_client = True
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user