11package datadog .trace .api .llmobs ;
22
3+ import datadog .trace .api .llmobs .noop .NoOpLLMObsEvalProcessor ;
34import datadog .trace .api .llmobs .noop .NoOpLLMObsSpanFactory ;
5+ import java .util .Map ;
46import javax .annotation .Nullable ;
57
68public class LLMObs {
79 protected static LLMObsSpanFactory SPAN_FACTORY = NoOpLLMObsSpanFactory .INSTANCE ;
10+ protected static LLMObsEvalProcessor EVAL_PROCESSOR = NoOpLLMObsEvalProcessor .INSTANCE ;
811
912 public static LLMObsSpan startLLMSpan (
1013 String spanName ,
@@ -40,6 +43,10 @@ public static LLMObsSpan startWorkflowSpan(
4043 return SPAN_FACTORY .startWorkflowSpan (spanName , mlApp , sessionID );
4144 }
4245
46+ public static void SubmitEvaluation (LLMObsSpan llmObsSpan , String label , String categoricalValue , Map <String , Object > tags ) {}
47+
48+ public static void SubmitEvaluation (LLMObsSpan llmObsSpan , String label , double numericalValue , Map <String , Object > tags ) {}
49+
4350 public interface LLMObsSpanFactory {
4451 LLMObsSpan startLLMSpan (
4552 String spanName ,
@@ -57,4 +64,9 @@ LLMObsSpan startLLMSpan(
5764 LLMObsSpan startWorkflowSpan (
5865 String spanName , @ Nullable String mlApp , @ Nullable String sessionID );
5966 }
67+
68+ public interface LLMObsEvalProcessor {
69+ void SubmitEvaluation (LLMObsSpan llmObsSpan , String label , double numericalValue , Map <String , Object > tags );
70+ void SubmitEvaluation (LLMObsSpan llmObsSpan , String label , String categoricalValue , Map <String , Object > tags );
71+ }
6072}
0 commit comments