Class: Google::Apis::CesV1::SessionInput

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

Input for the session.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SessionInput

Returns a new instance of SessionInput.



5987
5988
5989
# File 'lib/google/apis/ces_v1/classes.rb', line 5987

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

Instance Attribute Details

#audioString

Optional. Audio data from the end user. Corresponds to the JSON property audio NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


5937
5938
5939
# File 'lib/google/apis/ces_v1/classes.rb', line 5937

def audio
  @audio
end

#blobGoogle::Apis::CesV1::Blob

Represents a blob input or output in the conversation. Corresponds to the JSON property blob



5942
5943
5944
# File 'lib/google/apis/ces_v1/classes.rb', line 5942

def blob
  @blob
end

#dtmfString

Optional. DTMF digits from the end user. Corresponds to the JSON property dtmf

Returns:

  • (String)


5947
5948
5949
# File 'lib/google/apis/ces_v1/classes.rb', line 5947

def dtmf
  @dtmf
end

#eventGoogle::Apis::CesV1::Event

Event input. Corresponds to the JSON property event



5952
5953
5954
# File 'lib/google/apis/ces_v1/classes.rb', line 5952

def event
  @event
end

#imageGoogle::Apis::CesV1::Image

Represents an image input or output in the conversation. Corresponds to the JSON property image



5957
5958
5959
# File 'lib/google/apis/ces_v1/classes.rb', line 5957

def image
  @image
end

#textString

Optional. Text data from the end user. Corresponds to the JSON property text

Returns:

  • (String)


5962
5963
5964
# File 'lib/google/apis/ces_v1/classes.rb', line 5962

def text
  @text
end

#tool_responsesGoogle::Apis::CesV1::ToolResponses

Execution results for the requested tool calls from the client. Corresponds to the JSON property toolResponses



5967
5968
5969
# File 'lib/google/apis/ces_v1/classes.rb', line 5967

def tool_responses
  @tool_responses
end

#variablesHash<String,Object>

Optional. Contextual variables for the session, keyed by name. Only variables declared in the app will be used by the CES agent. Unrecognized variables will still be sent to the Dialogflow agent as additional session parameters. Corresponds to the JSON property variables

Returns:

  • (Hash<String,Object>)


5974
5975
5976
# File 'lib/google/apis/ces_v1/classes.rb', line 5974

def variables
  @variables
end

#will_continueBoolean Also known as: will_continue?

Optional. A flag to indicate if the current message is a fragment of a larger input in the bidi streaming session. When set to true, the agent defers processing until it receives a subsequent message where will_continue is false, or until the system detects an endpoint in the audio input. NOTE: This field does not apply to audio and DTMF inputs, as they are always processed automatically based on the endpointing signal. Corresponds to the JSON property willContinue

Returns:

  • (Boolean)


5984
5985
5986
# File 'lib/google/apis/ces_v1/classes.rb', line 5984

def will_continue
  @will_continue
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
# File 'lib/google/apis/ces_v1/classes.rb', line 5992

def update!(**args)
  @audio = args[:audio] if args.key?(:audio)
  @blob = args[:blob] if args.key?(:blob)
  @dtmf = args[:dtmf] if args.key?(:dtmf)
  @event = args[:event] if args.key?(:event)
  @image = args[:image] if args.key?(:image)
  @text = args[:text] if args.key?(:text)
  @tool_responses = args[:tool_responses] if args.key?(:tool_responses)
  @variables = args[:variables] if args.key?(:variables)
  @will_continue = args[:will_continue] if args.key?(:will_continue)
end