Method 1: wrapModel
In addition to the lunary.wrapAgent
& lunary.wrapTool
methods, we provide a wrapModel
method.
It allows to wrap any async function. It also takes the following options:
Method 2: .trackEvent
If you don’t want to wrap your model, you can also use the lunary.trackEvent
method.
First, track the start of your query:
Note
Input & output can be any object or array of object, however we recommend using the ChatMessage format: