(
output: unknown,
runId: string,
_parentRunId?: string,
_tags?: string[],
_extraParams?: Record<string, unknown>,
)
| 166 | |
| 167 | // LLM End Handler - note: handleLLMEnd with capital LLM (used by both LLMs and chat models!) |
| 168 | handleLLMEnd( |
| 169 | output: unknown, |
| 170 | runId: string, |
| 171 | _parentRunId?: string, |
| 172 | _tags?: string[], |
| 173 | _extraParams?: Record<string, unknown>, |
| 174 | ) { |
| 175 | const span = spanMap.get(runId); |
| 176 | if (span?.isRecording()) { |
| 177 | const attributes = extractLlmResponseAttributes(output as LangChainLLMResult, recordOutputs); |
| 178 | if (attributes) { |
| 179 | span.setAttributes(attributes); |
| 180 | } |
| 181 | exitSpan(runId); |
| 182 | } |
| 183 | }, |
| 184 | |
| 185 | // LLM Error Handler - note: handleLLMError with capital LLM |
| 186 | handleLLMError(error: Error, runId: string) { |
nothing calls this directly
no test coverage detected