When to use

Use this method when catching errors from failed LLM calls, feeding in your your error object and other additional metadata.

Usage

Function Parameters

error
any
required

Error response from LLM, such as an object or a string. Must be JSON serializable.

messages
array
required

List of objects, each representing a message in the LLM conversation chain.

metadata
object

Metadata object, as specified here.

Response

The logError method will return a Promise that resolves to an object with the following fields:

success
boolean

Whether or not the log was successful.