Class FunctionInvokeParams.Body.Builder
-
- All Implemented Interfaces:
public final class FunctionInvokeParams.Body.BuilderA builder for Body.
-
-
Method Summary
-
-
Method Detail
-
expected
final FunctionInvokeParams.Body.Builder expected(JsonValue expected)
The expected output of the function
-
input
final FunctionInvokeParams.Body.Builder input(JsonValue input)
Argument to the function, which can be any JSON serializable value
-
messages
final FunctionInvokeParams.Body.Builder messages(List<FunctionInvokeParams.Message> messages)
If the function is an LLM, additional messages to pass along to it
-
messages
final FunctionInvokeParams.Body.Builder messages(JsonField<List<FunctionInvokeParams.Message>> messages)
Sets Builder.messages to an arbitrary JSON value.
You should usually call Builder.messages with a well-typed
List<Message>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addMessage
final FunctionInvokeParams.Body.Builder addMessage(FunctionInvokeParams.Message message)
-
addMessage
final FunctionInvokeParams.Body.Builder addMessage(FunctionInvokeParams.Message.System system)
Alias for calling addMessage with
Message.ofSystem(system).
-
addMessage
final FunctionInvokeParams.Body.Builder addMessage(FunctionInvokeParams.Message.User user)
Alias for calling addMessage with
Message.ofUser(user).
-
addMessage
final FunctionInvokeParams.Body.Builder addMessage(FunctionInvokeParams.Message.Assistant assistant)
Alias for calling addMessage with
Message.ofAssistant(assistant).
-
addMessage
final FunctionInvokeParams.Body.Builder addMessage(FunctionInvokeParams.Message.Tool tool)
Alias for calling addMessage with
Message.ofTool(tool).
-
addMessage
final FunctionInvokeParams.Body.Builder addMessage(FunctionInvokeParams.Message.Function function)
Alias for calling addMessage with
Message.ofFunction(function).
-
addMessage
final FunctionInvokeParams.Body.Builder addMessage(FunctionInvokeParams.Message.Fallback fallback)
Alias for calling addMessage with
Message.ofFallback(fallback).
-
metadata
final FunctionInvokeParams.Body.Builder metadata(FunctionInvokeParams.Metadata metadata)
Any relevant metadata
-
metadata
final FunctionInvokeParams.Body.Builder metadata(Optional<FunctionInvokeParams.Metadata> metadata)
Alias for calling Builder.metadata with
metadata.orElse(null).
-
metadata
final FunctionInvokeParams.Body.Builder metadata(JsonField<FunctionInvokeParams.Metadata> metadata)
Sets Builder.metadata to an arbitrary JSON value.
You should usually call Builder.metadata with a well-typed Metadata value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
mode
final FunctionInvokeParams.Body.Builder mode(FunctionInvokeParams.Mode mode)
The mode format of the returned value (defaults to 'auto')
-
mode
final FunctionInvokeParams.Body.Builder mode(Optional<FunctionInvokeParams.Mode> mode)
Alias for calling Builder.mode with
mode.orElse(null).
-
mode
final FunctionInvokeParams.Body.Builder mode(JsonField<FunctionInvokeParams.Mode> mode)
Sets Builder.mode to an arbitrary JSON value.
You should usually call Builder.mode with a well-typed Mode value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
parent
final FunctionInvokeParams.Body.Builder parent(FunctionInvokeParams.Parent parent)
Options for tracing the function call
-
parent
final FunctionInvokeParams.Body.Builder parent(JsonField<FunctionInvokeParams.Parent> parent)
Sets Builder.parent to an arbitrary JSON value.
You should usually call Builder.parent with a well-typed Parent value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
parent
final FunctionInvokeParams.Body.Builder parent(FunctionInvokeParams.Parent.SpanParentStruct spanParentStruct)
Alias for calling parent with
Parent.ofSpanParentStruct(spanParentStruct).
-
parent
final FunctionInvokeParams.Body.Builder parent(String string)
Alias for calling parent with
Parent.ofString(string).
-
stream
final FunctionInvokeParams.Body.Builder stream(Boolean stream)
Whether to stream the response. If true, results will be returned in the Braintrust SSE format.
-
stream
final FunctionInvokeParams.Body.Builder stream(Boolean stream)
Alias for Builder.stream.
This unboxed primitive overload exists for backwards compatibility.
-
stream
final FunctionInvokeParams.Body.Builder stream(Optional<Boolean> stream)
Alias for calling Builder.stream with
stream.orElse(null).
-
stream
final FunctionInvokeParams.Body.Builder stream(JsonField<Boolean> stream)
Sets Builder.stream to an arbitrary JSON value.
You should usually call Builder.stream with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
version
final FunctionInvokeParams.Body.Builder version(String version)
The version of the function
-
version
final FunctionInvokeParams.Body.Builder version(JsonField<String> version)
Sets Builder.version to an arbitrary JSON value.
You should usually call Builder.version with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final FunctionInvokeParams.Body.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final FunctionInvokeParams.Body.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final FunctionInvokeParams.Body.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final FunctionInvokeParams.Body.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final FunctionInvokeParams.Body.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final FunctionInvokeParams.Body build()
Returns an immutable instance of Body.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-