langfuse generation spans with token usage; switch llm to vllm (qwen2.5-coder-7b on mcrndeb)

This commit is contained in:
2026-06-03 10:33:22 -03:00
parent bd34c8c5ce
commit 61494362a3
7 changed files with 103 additions and 25 deletions

View File

@@ -128,7 +128,7 @@ async def _synthesize_node(state: RunState) -> dict[str, Any]:
for f in findings
)
with lf.span("synthesize", as_type="generation", input={"findings": len(findings)}) as span:
with lf.span("synthesize", input={"findings": len(findings)}) as span:
answer = chat(
system=load("synthesize.system"),
user=render(
@@ -137,6 +137,7 @@ async def _synthesize_node(state: RunState) -> dict[str, Any]:
findings_block=findings_block,
),
max_tokens=512,
span_name="synthesize.gen",
)
span.update(output={"answer": answer})
return {"answer": answer}