lib/google/cloud/dialogflow/v2/sessions/client.rb in google-cloud-dialogflow-v2-0.21.0 vs lib/google/cloud/dialogflow/v2/sessions/client.rb in google-cloud-dialogflow-v2-0.22.0
- old
+ new
@@ -349,25 +349,25 @@
# require "google/cloud/dialogflow/v2"
#
# # Create a client object. The client can be reused for multiple calls.
# client = Google::Cloud::Dialogflow::V2::Sessions::Client.new
#
- # # Create an input stream
+ # # Create an input stream.
# input = Gapic::StreamInput.new
#
# # Call the streaming_detect_intent method to start streaming.
# output = client.streaming_detect_intent input
#
- # # Send requests on the stream. For each request, pass in keyword
- # # arguments to set fields. Be sure to close the stream when done.
+ # # Send requests on the stream. For each request object, set fields by
+ # # passing keyword arguments. Be sure to close the stream when done.
# input << Google::Cloud::Dialogflow::V2::StreamingDetectIntentRequest.new
# input << Google::Cloud::Dialogflow::V2::StreamingDetectIntentRequest.new
# input.close
#
- # # Handle streamed responses. These may be interleaved with inputs.
- # # Each response is of type ::Google::Cloud::Dialogflow::V2::StreamingDetectIntentResponse.
- # output.each do |response|
- # p response
+ # # The returned object is a streamed enumerable yielding elements of type
+ # # ::Google::Cloud::Dialogflow::V2::StreamingDetectIntentResponse
+ # output.each do |current_response|
+ # p current_response
# end
#
def streaming_detect_intent request, options = nil
unless request.is_a? ::Enumerable
raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum