Repository navigation
Conversation
jsonbailey
left a comment
There was a problem hiding this comment.
Just a few questions since I'm not as familiar with Go.
|
This should be
Marking it |
| // | ||
| // Subsequent calls re-run the task but emit only metrics not already recorded | ||
| // on this Tracker. Call CreateTracker on the AI Config to start a new run. | ||
| func (t *Tracker) TrackRequest(task func(c *Config) (AIMetrics, error)) (AIMetrics, error) { |
There was a problem hiding this comment.
Question on the approach here: this changes TrackRequest's signature in place ((ProviderResponse, error) → (AIMetrics, error)) and removes the exported ProviderResponse type, which silently breaks any caller compiling against v0.9.0. Rather than redefining the existing method, would you prefer to either (a) leave the existing TrackRequest/ProviderResponse in place alongside the new TrackMetricsOf (keeps it non-breaking), or (b) remove TrackRequest entirely as an explicit breaking change (clean, and pushes callers to TrackMetricsOf)? Changing it in place is the one option that breaks callers without it being obvious. What's your preference?
Ports the remaining non-experimental Python tracker surface; equivalents: python#112 (launchdarkly/python-server-sdk-ai#112), js-core#1332 (launchdarkly/js-core#1332)).
ldaipackage). Extractor returns *AIMetrics (nil = duration-only, Python's None); extractor panics degrade to duration-only; task panics still record duration+error.