Class RealtimeSessionCreateRequest.Builder
- 
                    
                    - All Implemented Interfaces:
 
 public final class RealtimeSessionCreateRequest.BuilderA builder for RealtimeSessionCreateRequest. 
- 
                
                    
                    - 
                                
                            
                                Method Summary- 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        typefinal RealtimeSessionCreateRequest.Builder type(JsonValue type) Sets the field to an arbitrary JSON value. It is usually unnecessary to call this method because the field defaults to the following: JsonValue.from("realtime")This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        audiofinal RealtimeSessionCreateRequest.Builder audio(RealtimeAudioConfig audio) Configuration for input and output audio. 
 - 
                                        audiofinal RealtimeSessionCreateRequest.Builder audio(JsonField<RealtimeAudioConfig> audio) Sets Builder.audio to an arbitrary JSON value. You should usually call Builder.audio with a well-typed RealtimeAudioConfig value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        includefinal RealtimeSessionCreateRequest.Builder include(List<RealtimeSessionCreateRequest.Include> include) Additional fields to include in server outputs. item.input_audio_transcription.logprobs: Include logprobs for input audio transcription.
 - 
                                        includefinal RealtimeSessionCreateRequest.Builder include(JsonField<List<RealtimeSessionCreateRequest.Include>> include) Sets Builder.include to an arbitrary JSON value. You should usually call Builder.include with a well-typed List<Include>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
 - 
                                        addIncludefinal RealtimeSessionCreateRequest.Builder addInclude(RealtimeSessionCreateRequest.Include include) Adds a single Include to Builder.include. 
 - 
                                        instructionsfinal RealtimeSessionCreateRequest.Builder instructions(String instructions) The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the session.createdevent at the start of the session.
 - 
                                        instructionsfinal RealtimeSessionCreateRequest.Builder instructions(JsonField<String> instructions) Sets Builder.instructions to an arbitrary JSON value. You should usually call Builder.instructions with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        maxOutputTokensfinal RealtimeSessionCreateRequest.Builder maxOutputTokens(RealtimeSessionCreateRequest.MaxOutputTokens maxOutputTokens) Maximum number of output tokens for a single assistant response, inclusive of tool calls. Provide an integer between 1 and 4096 to limit output tokens, or inffor the maximum available tokens for a given model. Defaults toinf.
 - 
                                        maxOutputTokensfinal RealtimeSessionCreateRequest.Builder maxOutputTokens(JsonField<RealtimeSessionCreateRequest.MaxOutputTokens> maxOutputTokens) Sets Builder.maxOutputTokens to an arbitrary JSON value. You should usually call Builder.maxOutputTokens with a well-typed MaxOutputTokens value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        maxOutputTokensfinal RealtimeSessionCreateRequest.Builder maxOutputTokens(Long integer) Alias for calling maxOutputTokens with MaxOutputTokens.ofInteger(integer).
 - 
                                        maxOutputTokensInffinal RealtimeSessionCreateRequest.Builder maxOutputTokensInf() Alias for calling maxOutputTokens with MaxOutputTokens.ofInf().
 - 
                                        modelfinal RealtimeSessionCreateRequest.Builder model(RealtimeSessionCreateRequest.Model model) The Realtime model used for this session. 
 - 
                                        modelfinal RealtimeSessionCreateRequest.Builder model(JsonField<RealtimeSessionCreateRequest.Model> model) Sets Builder.model to an arbitrary JSON value. You should usually call Builder.model with a well-typed Model value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        modelfinal RealtimeSessionCreateRequest.Builder model(String value) Sets model to an arbitrary String. You should usually call model with a well-typed Model constant instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        outputModalitiesfinal RealtimeSessionCreateRequest.Builder outputModalities(List<RealtimeSessionCreateRequest.OutputModality> outputModalities) The set of modalities the model can respond with. It defaults to ["audio"], indicating that the model will respond with audio plus a transcript.["text"]can be used to make the model respond with text only. It is not possible to request bothtextandaudioat the same time.
 - 
                                        outputModalitiesfinal RealtimeSessionCreateRequest.Builder outputModalities(JsonField<List<RealtimeSessionCreateRequest.OutputModality>> outputModalities) Sets Builder.outputModalities to an arbitrary JSON value. You should usually call Builder.outputModalities with a well-typed List<OutputModality>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
 - 
                                        addOutputModalityfinal RealtimeSessionCreateRequest.Builder addOutputModality(RealtimeSessionCreateRequest.OutputModality outputModality) Adds a single OutputModality to outputModalities. 
 - 
                                        promptfinal RealtimeSessionCreateRequest.Builder prompt(ResponsePrompt prompt) Reference to a prompt template and its variables. Learn more. 
 - 
                                        promptfinal RealtimeSessionCreateRequest.Builder prompt(Optional<ResponsePrompt> prompt) Alias for calling Builder.prompt with prompt.orElse(null).
 - 
                                        promptfinal RealtimeSessionCreateRequest.Builder prompt(JsonField<ResponsePrompt> prompt) Sets Builder.prompt to an arbitrary JSON value. You should usually call Builder.prompt with a well-typed ResponsePrompt value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        toolChoicefinal RealtimeSessionCreateRequest.Builder toolChoice(RealtimeToolChoiceConfig toolChoice) How the model chooses tools. Provide one of the string modes or force a specific function/MCP tool. 
 - 
                                        toolChoicefinal RealtimeSessionCreateRequest.Builder toolChoice(JsonField<RealtimeToolChoiceConfig> toolChoice) Sets Builder.toolChoice to an arbitrary JSON value. You should usually call Builder.toolChoice with a well-typed RealtimeToolChoiceConfig value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        toolChoicefinal RealtimeSessionCreateRequest.Builder toolChoice(ToolChoiceOptions toolChoiceOptions) Alias for calling toolChoice with RealtimeToolChoiceConfig.ofToolChoiceOptions(toolChoiceOptions).
 - 
                                        toolChoicefinal RealtimeSessionCreateRequest.Builder toolChoice(ToolChoiceFunction toolChoiceFunction) Alias for calling toolChoice with RealtimeToolChoiceConfig.ofToolChoiceFunction(toolChoiceFunction).
 - 
                                        toolChoicefinal RealtimeSessionCreateRequest.Builder toolChoice(ToolChoiceMcp toolChoiceMcp) Alias for calling toolChoice with RealtimeToolChoiceConfig.ofToolChoiceMcp(toolChoiceMcp).
 - 
                                        toolsfinal RealtimeSessionCreateRequest.Builder tools(List<RealtimeToolsConfigUnion> tools) Tools available to the model. 
 - 
                                        toolsfinal RealtimeSessionCreateRequest.Builder tools(JsonField<List<RealtimeToolsConfigUnion>> tools) Sets Builder.tools to an arbitrary JSON value. You should usually call Builder.tools with a well-typed List<RealtimeToolsConfigUnion>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
 - 
                                        addToolfinal RealtimeSessionCreateRequest.Builder addTool(RealtimeToolsConfigUnion tool) Adds a single RealtimeToolsConfigUnion to tools. 
 - 
                                        addToolfinal RealtimeSessionCreateRequest.Builder addTool(RealtimeFunctionTool function) Alias for calling addTool with RealtimeToolsConfigUnion.ofFunction(function).
 - 
                                        addToolfinal RealtimeSessionCreateRequest.Builder addTool(RealtimeToolsConfigUnion.Mcp mcp) Alias for calling addTool with RealtimeToolsConfigUnion.ofMcp(mcp).
 - 
                                        addMcpToolfinal RealtimeSessionCreateRequest.Builder addMcpTool(String serverLabel) Alias for calling addTool with the following: RealtimeToolsConfigUnion.Mcp.builder() .serverLabel(serverLabel) .build()
 - 
                                        tracingfinal RealtimeSessionCreateRequest.Builder tracing(RealtimeTracingConfig tracing) Realtime API can write session traces to the /logs?api=traces. Set to null to disable tracing. Once tracing is enabled for a session, the configuration cannot be modified. autowill create a trace for the session with default values for the workflow name, group id, and metadata.
 - 
                                        tracingfinal RealtimeSessionCreateRequest.Builder tracing(Optional<RealtimeTracingConfig> tracing) Alias for calling Builder.tracing with tracing.orElse(null).
 - 
                                        tracingfinal RealtimeSessionCreateRequest.Builder tracing(JsonField<RealtimeTracingConfig> tracing) Sets Builder.tracing to an arbitrary JSON value. You should usually call Builder.tracing with a well-typed RealtimeTracingConfig value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        tracingfinal RealtimeSessionCreateRequest.Builder tracing(RealtimeTracingConfig.TracingConfiguration tracingConfiguration) Alias for calling tracing with RealtimeTracingConfig.ofTracingConfiguration(tracingConfiguration).
 - 
                                        tracingAutofinal RealtimeSessionCreateRequest.Builder tracingAuto() Alias for calling tracing with RealtimeTracingConfig.ofAuto().
 - 
                                        truncationfinal RealtimeSessionCreateRequest.Builder truncation(RealtimeTruncation truncation) Controls how the realtime conversation is truncated prior to model inference. The default is auto.
 - 
                                        truncationfinal RealtimeSessionCreateRequest.Builder truncation(JsonField<RealtimeTruncation> truncation) Sets Builder.truncation to an arbitrary JSON value. You should usually call Builder.truncation with a well-typed RealtimeTruncation value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        truncationfinal RealtimeSessionCreateRequest.Builder truncation(RealtimeTruncation.RealtimeTruncationStrategy strategy) Alias for calling truncation with RealtimeTruncation.ofStrategy(strategy).
 - 
                                        truncationfinal RealtimeSessionCreateRequest.Builder truncation(RealtimeTruncationRetentionRatio retentionRatio) Alias for calling truncation with RealtimeTruncation.ofRetentionRatio(retentionRatio).
 - 
                                        additionalPropertiesfinal RealtimeSessionCreateRequest.Builder additionalProperties(Map<String, JsonValue> additionalProperties) 
 - 
                                        putAdditionalPropertyfinal RealtimeSessionCreateRequest.Builder putAdditionalProperty(String key, JsonValue value) 
 - 
                                        putAllAdditionalPropertiesfinal RealtimeSessionCreateRequest.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties) 
 - 
                                        removeAdditionalPropertyfinal RealtimeSessionCreateRequest.Builder removeAdditionalProperty(String key) 
 - 
                                        removeAllAdditionalPropertiesfinal RealtimeSessionCreateRequest.Builder removeAllAdditionalProperties(Set<String> keys) 
 - 
                                        buildfinal RealtimeSessionCreateRequest build() Returns an immutable instance of RealtimeSessionCreateRequest. Further updates to this Builder will not mutate the returned instance. 
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-