async def sample_streaming_analyze_content(): # Create a client client = dialogflow_v2beta1.ParticipantsAsyncClient() # Initialize request argument(s) request = dialogflow_v2beta1.StreamingAnalyzeContentRequest( input_audio=b'input_audio_blob', participant="participant_value", ) # This method expects an iterator which contains # 'dialogflow_v2beta1.StreamingAnalyzeContentRequest' objects # Here we create a generator that yields a single `request` for # demonstrative purposes. requests = [request] def request_generator(): for request in requests: yield request # Make the request stream = await client.streaming_analyze_content( requests=request_generator()) # Handle the response async for response in stream: print(response)
async def sample_update_participant(): # Create a client client = dialogflow_v2beta1.ParticipantsAsyncClient() # Initialize request argument(s) request = dialogflow_v2beta1.UpdateParticipantRequest() # Make the request response = await client.update_participant(request=request) # Handle the response print(response)
async def sample_compile_suggestion(): # Create a client client = dialogflow_v2beta1.ParticipantsAsyncClient() # Initialize request argument(s) request = dialogflow_v2beta1.CompileSuggestionRequest() # Make the request response = await client.compile_suggestion(request=request) # Handle the response print(response)
async def sample_get_participant(): # Create a client client = dialogflow_v2beta1.ParticipantsAsyncClient() # Initialize request argument(s) request = dialogflow_v2beta1.GetParticipantRequest(name="name_value", ) # Make the request response = await client.get_participant(request=request) # Handle the response print(response)
async def sample_analyze_content(): # Create a client client = dialogflow_v2beta1.ParticipantsAsyncClient() # Initialize request argument(s) request = dialogflow_v2beta1.AnalyzeContentRequest( participant="participant_value", ) # Make the request response = await client.analyze_content(request=request) # Handle the response print(response)
async def sample_suggest_articles(): # Create a client client = dialogflow_v2beta1.ParticipantsAsyncClient() # Initialize request argument(s) request = dialogflow_v2beta1.SuggestArticlesRequest( parent="parent_value", ) # Make the request response = await client.suggest_articles(request=request) # Handle the response print(response)
async def sample_list_suggestions(): # Create a client client = dialogflow_v2beta1.ParticipantsAsyncClient() # Initialize request argument(s) request = dialogflow_v2beta1.ListSuggestionsRequest() # Make the request page_result = client.list_suggestions(request=request) # Handle the response async for response in page_result: print(response)