Uses of Class
com.ants.platform.tracing.AntsGeneration
Packages that use AntsGeneration
-
Uses of AntsGeneration in com.ants.platform.tracing
Methods in com.ants.platform.tracing that return AntsGenerationModifier and TypeMethodDescriptionAntsGeneration.completionStartTime(Instant completionStartTime) Timestamp when the model began streaming the completion.Cost breakdown (optional; the backend computes cost from model + usage).Name of the model used (e.g.AntsGeneration.modelParameters(Map<String, ?> params) Model invocation parameters (temperature, max_tokens, ...), serialized to JSON.Links this generation to a managed prompt by name + version.AntsGeneration.recordError(Throwable error) AntsObservation.startChildGeneration(String name) Starts a childgenerationparented to this observation.static AntsGenerationAnts.startGeneration(String name) Starts ageneration, nested under the current active span if any.static AntsGenerationAnts.startGeneration(String name, AntsObservation parent) Starts agenerationexplicitly parented toparent.AntsGeneration.statusMessage(String statusMessage) AntsGeneration.updateTrace(TraceAttributes attrs) AntsGeneration.usage(long inputTokens, long outputTokens) Convenience: report input/output token counts; total is their sum.AntsGeneration.usage(long inputTokens, long outputTokens, long totalTokens) Convenience: report input/output/total token counts.Token usage as an arbitrary map (e.g.Method parameters in com.ants.platform.tracing with type arguments of type AntsGenerationModifier and TypeMethodDescriptionstatic <T> TAnts.observeGeneration(String name, Function<AntsGeneration, T> fn) static voidAnts.startActiveGeneration(String name, Consumer<AntsGeneration> fn) Active variant for generations.