File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
pkgs/sdk/server-ai/src/Interfaces Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ public interface ILdAiConfigTracker
2727 /// <summary>
2828 /// Tracks the duration of a task, and returns the result of the task.
2929 ///
30+ /// If the provided task throws, then this method will also throw.
31+ ///
32+ /// In the case the provided function throws, this function will still
33+ /// record the duration.
3034 /// </summary>
3135 /// <param name="task">the task</param>
3236 /// <typeparam name="T">type of the task's result</typeparam>
@@ -54,6 +58,16 @@ public interface ILdAiConfigTracker
5458 /// Tracks a request to a provider. The request is a task that returns a <see cref="Response"/>, which
5559 /// contains information about the request such as token usage and metrics.
5660 ///
61+ /// This function will track the duration of the operation, the token
62+ /// usage, and the success or error status.
63+ ///
64+ /// If the provided function throws, then this method will also throw.
65+ ///
66+ /// In the case the provided function throws, this function will record the
67+ /// duration and an error.
68+ ///
69+ /// A failed operation will not have any token usage data.
70+ ///
5771 /// It is the responsibility of the caller to fill in the <see cref="Response"/> object with any details
5872 /// that should be tracked.
5973 ///
You can’t perform that action at this time.
0 commit comments