You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
some models return multiple choices in one response
each choice has a finish reason that explains why model stopped generating content which contains values like stop, length, filtered... - this could be very useful to know, query and aggregate by
Having array attribute is problematic since it's harder to query and not really possible to use on metrics or per-choice events.
Multiple choices are supported by a limited set of models. Event when multiple choices are supported some SDKs (e.g. openai-dotnet) make a choice not to expose it on the convenience API level to simplify the design and provide much more friendly experience.
Most of examples and documentation assumes there is just one choice.
Given this, it seems that in most of the cases there will be just one choice and just one finish reason on each span.
The proposal is to
change type from string array to string
rename the attribute to gen_ai.response.finish_reason
report one value (either one of the following)
last reason
comma-separated reasons like stop,length
we can reuse this attribute on events in case we want to promote corresponding body field to attributes
The text was updated successfully, but these errors were encountered:
See #980 (comment).
Context:
stop
,length
,filtered
... - this could be very useful to know, query and aggregate byHaving array attribute is problematic since it's harder to query and not really possible to use on metrics or per-choice events.
Multiple choices are supported by a limited set of models. Event when multiple choices are supported some SDKs (e.g. openai-dotnet) make a choice not to expose it on the convenience API level to simplify the design and provide much more friendly experience.
Most of examples and documentation assumes there is just one choice.
Given this, it seems that in most of the cases there will be just one choice and just one finish reason on each span.
The proposal is to
gen_ai.response.finish_reason
stop,length
The text was updated successfully, but these errors were encountered: