-
Notifications
You must be signed in to change notification settings - Fork 278
Description
Area(s)
area:gen-ai
What's missing?
Although there are existing events for tool calling (gen_ai.assistant.message, gen_ai.tool.message), these are more geared towards the Gen AI model's view of what tools should be invoked/called (rather than from the standpoint of instrumenting the tool that ultimately got invoked). Additionally, these are somewhat complicated to generate and may not always be available (if the tool calling is deeply nested inside the logic of the client).
Where the model invokes local tools, it would be useful to be able to implement recording the input/output of those tool calls by intercepting the tool registration and having a somewhat simpler interface for tracing those calls. I also think that some of this modelling could be more general than just Gen AI.
I propose that we have a more generalized representation of function tracing to events that could be used.
Describe the solution you'd like
I'd like for there to be a more general set of events associated with function tracing:
Function Start
Represents a function being invoked and provides a way to record the parameters:
- Attributes:
event.name: "function_start"code.function.name: the name of the function that was calledpositional_argument_count: the count of positional argskeyword_argument_count: the count of keyword or optional arguments
- Body:
positional_arguments: an array of the positional argumentskeyword_arguments: a dictionary of the keyword arguments
Function End
Represents the result of a function being invoked.
- Attributes:
event.name: "function_end"code.function.name: the name of the function that was callederror.type: if there was an error
- Body:
result: JSON representation of the (succesful) resulterror: JSON representation of the (error) result
Metadata
Metadata
Assignees
Type
Projects
Status