Invoke a function.
Most Braintrust endpoints are authenticated by providing your API key as a header Authorization: Bearer [api_key] to your HTTP request. You can create an API key in the Braintrust organization settings page.
Function id
Function invocation parameters
The request to invoke a function
Argument to the function, which can be any JSON serializable value
The expected output of the function
Any relevant metadata. This will be logged and available as the metadata argument.
Any relevant tags to log on the span.
If the function is an LLM, additional messages to pass along to it
Options for tracing the function call
Whether to stream the response. If true, results will be returned in the Braintrust SSE format.
The mode format of the returned value (defaults to 'auto')
auto, parallel, If true, throw an error if one of the variables in the prompt is not present in the input
Map of MCP server URL to auth credentials
The version of the function
Function invocation response
The response is of type unknown.