Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions pkgs/sdk/server-ai/src/Interfaces/ILdAiConfigTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ public interface ILdAiConfigTracker
/// <summary>
/// Tracks the duration of a task, and returns the result of the task.
///
/// If the provided task throws, then this method will also throw.
///
/// In the case the provided function throws, this function will still
/// record the duration.
/// </summary>
/// <param name="task">the task</param>
/// <typeparam name="T">type of the task's result</typeparam>
Expand Down Expand Up @@ -54,6 +58,16 @@ public interface ILdAiConfigTracker
/// Tracks a request to a provider. The request is a task that returns a <see cref="Response"/>, which
/// contains information about the request such as token usage and metrics.
///
/// This function will track the duration of the operation, the token
/// usage, and the success or error status.
///
/// If the provided function throws, then this method will also throw.
///
/// In the case the provided function throws, this function will record the
/// duration and an error.
///
/// A failed operation will not have any token usage data.
///
/// It is the responsibility of the caller to fill in the <see cref="Response"/> object with any details
/// that should be tracked.
///
Expand Down
Loading