11package datadog .trace .api .llmobs ;
22
3+ import datadog .trace .api .llmobs .noop .NoOpLLMObsEvalProcessor ;
34import datadog .trace .api .llmobs .noop .NoOpLLMObsSpanFactory ;
45import java .util .List ;
56import java .util .Map ;
67import javax .annotation .Nullable ;
78
89public class LLMObs {
910 protected static LLMObsSpanFactory SPAN_FACTORY = NoOpLLMObsSpanFactory .INSTANCE ;
11+ protected static LLMObsEvalProcessor EVAL_PROCESSOR = NoOpLLMObsEvalProcessor .INSTANCE ;
1012
1113 public static LLMObsSpan startLLMSpan (
1214 String spanName ,
@@ -42,6 +44,10 @@ public static LLMObsSpan startWorkflowSpan(
4244 return SPAN_FACTORY .startWorkflowSpan (spanName , mlApp , sessionID );
4345 }
4446
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+
4551 public interface LLMObsSpanFactory {
4652 LLMObsSpan startLLMSpan (
4753 String spanName ,
@@ -60,6 +66,11 @@ LLMObsSpan startWorkflowSpan(
6066 String spanName , @ Nullable String mlApp , @ Nullable String sessionID );
6167 }
6268
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+
6374 public static class ToolCall {
6475 private String name ;
6576 private String type ;
0 commit comments