Class FunctionInvokeParams
-
- All Implemented Interfaces:
-
com.braintrustdata.api.core.Params
public final class FunctionInvokeParams implements Params
Invoke a function.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classFunctionInvokeParams.BuilderA builder for FunctionInvokeParams.
public final classFunctionInvokeParams.BodyThe request to invoke a function
public final classFunctionInvokeParams.Messagepublic final classFunctionInvokeParams.MetadataAny relevant metadata
public final classFunctionInvokeParams.ModeThe mode format of the returned value (defaults to 'auto')
public final classFunctionInvokeParams.ParentOptions for tracing the function call
-
Method Summary
Modifier and Type Method Description final StringfunctionId()Function id final JsonValue_expected()The expected output of the function final JsonValue_input()Argument to the function, which can be any JSON serializable value final Optional<List<FunctionInvokeParams.Message>>messages()If the function is an LLM, additional messages to pass along to it final Optional<FunctionInvokeParams.Metadata>metadata()Any relevant metadata final Optional<FunctionInvokeParams.Mode>mode()The mode format of the returned value (defaults to 'auto') final Optional<FunctionInvokeParams.Parent>parent()Options for tracing the function call final Optional<Boolean>stream()Whether to stream the response. final Optional<String>version()The version of the function final JsonField<List<FunctionInvokeParams.Message>>_messages()Returns the raw JSON value of messages. final JsonField<FunctionInvokeParams.Metadata>_metadata()Returns the raw JSON value of metadata. final JsonField<FunctionInvokeParams.Mode>_mode()Returns the raw JSON value of mode. final JsonField<FunctionInvokeParams.Parent>_parent()Returns the raw JSON value of parent. final JsonField<Boolean>_stream()Returns the raw JSON value of stream. final JsonField<String>_version()Returns the raw JSON value of version. final Map<String, JsonValue>_additionalBodyProperties()final Headers_additionalHeaders()final QueryParams_additionalQueryParams()final FunctionInvokeParams.BuildertoBuilder()final FunctionInvokeParams.Body_body()final String_pathParam(Integer index)Headers_headers()The full set of headers in the parameters, including both fixed and additional headers. QueryParams_queryParams()The full set of query params in the parameters, including both fixed and additional query params. Booleanequals(Object other)IntegerhashCode()StringtoString()final static FunctionInvokeParams.Builderbuilder()Returns a mutable builder for constructing an instance of FunctionInvokeParams. -
-
Method Detail
-
functionId
final String functionId()
Function id
-
messages
final Optional<List<FunctionInvokeParams.Message>> messages()
If the function is an LLM, additional messages to pass along to it
-
metadata
final Optional<FunctionInvokeParams.Metadata> metadata()
Any relevant metadata
-
mode
final Optional<FunctionInvokeParams.Mode> mode()
The mode format of the returned value (defaults to 'auto')
-
parent
final Optional<FunctionInvokeParams.Parent> parent()
Options for tracing the function call
-
stream
final Optional<Boolean> stream()
Whether to stream the response. If true, results will be returned in the Braintrust SSE format.
-
_messages
final JsonField<List<FunctionInvokeParams.Message>> _messages()
Returns the raw JSON value of messages.
Unlike messages, this method doesn't throw if the JSON field has an unexpected type.
-
_metadata
final JsonField<FunctionInvokeParams.Metadata> _metadata()
Returns the raw JSON value of metadata.
Unlike metadata, this method doesn't throw if the JSON field has an unexpected type.
-
_mode
final JsonField<FunctionInvokeParams.Mode> _mode()
Returns the raw JSON value of mode.
Unlike mode, this method doesn't throw if the JSON field has an unexpected type.
-
_parent
final JsonField<FunctionInvokeParams.Parent> _parent()
Returns the raw JSON value of parent.
Unlike parent, this method doesn't throw if the JSON field has an unexpected type.
-
_stream
final JsonField<Boolean> _stream()
Returns the raw JSON value of stream.
Unlike stream, this method doesn't throw if the JSON field has an unexpected type.
-
_version
final JsonField<String> _version()
Returns the raw JSON value of version.
Unlike version, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalBodyProperties
final Map<String, JsonValue> _additionalBodyProperties()
-
_additionalHeaders
final Headers _additionalHeaders()
-
_additionalQueryParams
final QueryParams _additionalQueryParams()
-
toBuilder
final FunctionInvokeParams.Builder toBuilder()
-
_body
final FunctionInvokeParams.Body _body()
-
_pathParam
final String _pathParam(Integer index)
-
_headers
Headers _headers()
The full set of headers in the parameters, including both fixed and additional headers.
-
_queryParams
QueryParams _queryParams()
The full set of query params in the parameters, including both fixed and additional query params.
-
builder
final static FunctionInvokeParams.Builder builder()
Returns a mutable builder for constructing an instance of FunctionInvokeParams.
The following fields are required:
.functionId()
-
-
-
-