Class: Google::Apis::CesV1::SessionConfig

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/ces_v1/classes.rb,
lib/google/apis/ces_v1/representations.rb,
lib/google/apis/ces_v1/representations.rb

Overview

The configuration for the session.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SessionConfig

Returns a new instance of SessionConfig.



6070
6071
6072
# File 'lib/google/apis/ces_v1/classes.rb', line 6070

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#deploymentString

Optional. The deployment of the app to use for the session. Format: projects/ project/locations/location/apps/app/deployments/deployment` Corresponds to the JSON propertydeployment`

Returns:

  • (String)


6007
6008
6009
# File 'lib/google/apis/ces_v1/classes.rb', line 6007

def deployment
  @deployment
end

#enable_text_streamingBoolean Also known as: enable_text_streaming?

Optional. Whether to enable streaming text outputs from the model. By default, text outputs from the model are collected before sending to the client. NOTE: This is only supported for text (non-voice) sessions via StreamRunSession or BidiRunSession. Corresponds to the JSON property enableTextStreaming

Returns:

  • (Boolean)


6015
6016
6017
# File 'lib/google/apis/ces_v1/classes.rb', line 6015

def enable_text_streaming
  @enable_text_streaming
end

#entry_agentString

Optional. The entry agent to handle the session. If not specified, the session will be handled by the root agent of the app. Format: projects/project/ locations/location/apps/app/agents/agent` Corresponds to the JSON propertyentryAgent`

Returns:

  • (String)


6023
6024
6025
# File 'lib/google/apis/ces_v1/classes.rb', line 6023

def entry_agent
  @entry_agent
end

#historical_contextsArray<Google::Apis::CesV1::Message>

Optional. The historical context of the session, including user inputs, agent responses, and other messages. Typically, CES agent would manage session automatically so client doesn't need to explicitly populate this field. However, client can optionally override the historical contexts to force the session start from certain state. Corresponds to the JSON property historicalContexts

Returns:



6032
6033
6034
# File 'lib/google/apis/ces_v1/classes.rb', line 6032

def historical_contexts
  @historical_contexts
end

#input_audio_configGoogle::Apis::CesV1::InputAudioConfig

InputAudioConfig configures how the CES agent should interpret the incoming audio data. Corresponds to the JSON property inputAudioConfig



6038
6039
6040
# File 'lib/google/apis/ces_v1/classes.rb', line 6038

def input_audio_config
  @input_audio_config
end

#output_audio_configGoogle::Apis::CesV1::OutputAudioConfig

OutputAudioConfig configures how the CES agent should synthesize outgoing audio responses. Corresponds to the JSON property outputAudioConfig



6044
6045
6046
# File 'lib/google/apis/ces_v1/classes.rb', line 6044

def output_audio_config
  @output_audio_config
end

#remote_dialogflow_query_parametersGoogle::Apis::CesV1::SessionConfigRemoteDialogflowQueryParameters

QueryParameters to send to the remote Dialogflow agent when the session control is transferred to the remote agent. Corresponds to the JSON property remoteDialogflowQueryParameters



6053
6054
6055
# File 'lib/google/apis/ces_v1/classes.rb', line 6053

def remote_dialogflow_query_parameters
  @remote_dialogflow_query_parameters
end

#time_zoneString

Optional. The time zone of the user. If provided, the agent will use the time zone for date and time related variables. Otherwise, the agent will use the time zone specified in the App.time_zone_settings. The format is the IANA Time Zone Database time zone, e.g. "America/Los_Angeles". Corresponds to the JSON property timeZone

Returns:

  • (String)


6061
6062
6063
# File 'lib/google/apis/ces_v1/classes.rb', line 6061

def time_zone
  @time_zone
end

#use_tool_fakesBoolean Also known as: use_tool_fakes?

Optional. Whether to use tool fakes for the session. If this field is set, the agent will attempt use tool fakes instead of calling the real tools. Corresponds to the JSON property useToolFakes

Returns:

  • (Boolean)


6067
6068
6069
# File 'lib/google/apis/ces_v1/classes.rb', line 6067

def use_tool_fakes
  @use_tool_fakes
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
# File 'lib/google/apis/ces_v1/classes.rb', line 6075

def update!(**args)
  @deployment = args[:deployment] if args.key?(:deployment)
  @enable_text_streaming = args[:enable_text_streaming] if args.key?(:enable_text_streaming)
  @entry_agent = args[:entry_agent] if args.key?(:entry_agent)
  @historical_contexts = args[:historical_contexts] if args.key?(:historical_contexts)
  @input_audio_config = args[:input_audio_config] if args.key?(:input_audio_config)
  @output_audio_config = args[:output_audio_config] if args.key?(:output_audio_config)
  @remote_dialogflow_query_parameters = args[:remote_dialogflow_query_parameters] if args.key?(:remote_dialogflow_query_parameters)
  @time_zone = args[:time_zone] if args.key?(:time_zone)
  @use_tool_fakes = args[:use_tool_fakes] if args.key?(:use_tool_fakes)
end