Learn how to effectively track and log errors from LLM results and Tool calls in your AI application traces to improve performance and reliability.
// Create generation object const generation = trace.generation({ id: "generation-id", name: "customer-support--gather-information", // Additional fields }); // Track error generation.error({ message: "Rate limit exceeded. Please try again later.", type: "RateLimitError", code: "429", });
const traceToolCall = trace.toolCall({ id: "tool-call-id", name: "tool-call-name", }); traceToolCall.error({ message: "Service is currently unavailable. Please try again later.", type: "ServiceUnavailableError", code: "503", });
Was this page helpful?