1
1
package datadog .trace .api .llmobs ;
2
2
3
+ import datadog .trace .api .llmobs .noop .NoOpLLMObsEvalProcessor ;
3
4
import datadog .trace .api .llmobs .noop .NoOpLLMObsSpanFactory ;
4
5
import java .util .List ;
5
6
import java .util .Map ;
6
7
import javax .annotation .Nullable ;
7
8
8
9
public class LLMObs {
9
10
protected static LLMObsSpanFactory SPAN_FACTORY = NoOpLLMObsSpanFactory .INSTANCE ;
11
+ protected static LLMObsEvalProcessor EVAL_PROCESSOR = NoOpLLMObsEvalProcessor .INSTANCE ;
10
12
11
13
public static LLMObsSpan startLLMSpan (
12
14
String spanName ,
@@ -42,6 +44,10 @@ public static LLMObsSpan startWorkflowSpan(
42
44
return SPAN_FACTORY .startWorkflowSpan (spanName , mlApp , sessionID );
43
45
}
44
46
47
+ public static void SubmitEvaluation (LLMObsSpan llmObsSpan , String label , String categoricalValue , Map <String , Object > tags ) {}
48
+
49
+ public static void SubmitEvaluation (LLMObsSpan llmObsSpan , String label , double numericalValue , Map <String , Object > tags ) {}
50
+
45
51
public interface LLMObsSpanFactory {
46
52
LLMObsSpan startLLMSpan (
47
53
String spanName ,
@@ -60,6 +66,11 @@ LLMObsSpan startWorkflowSpan(
60
66
String spanName , @ Nullable String mlApp , @ Nullable String sessionID );
61
67
}
62
68
69
+ public interface LLMObsEvalProcessor {
70
+ void SubmitEvaluation (LLMObsSpan llmObsSpan , String label , double numericalValue , Map <String , Object > tags );
71
+ void SubmitEvaluation (LLMObsSpan llmObsSpan , String label , String categoricalValue , Map <String , Object > tags );
72
+ }
73
+
63
74
public static class ToolCall {
64
75
private String name ;
65
76
private String type ;
0 commit comments