pub struct SessionsClient { /* private fields */ }
Expand description

Google Dialogflow sessions client. Used for streaming detect intent API. Is NOT cloneable!

Implementations

Creates new sessions client using GCP project JSON credentials This client should be used for asynchronous invocation (streaming_detect_intent) See https://cloud.google.com/dialogflow/es/docs/how/detect-intent-stream

Returns sender than can be used to stream in audio bytes. This method will take the sender out of the option leaving None in its place. No additional sender can be retrieved from session client after this call. When sender is dropped respective stream will be closed.

Returns sender than can be used to stream in audio bytes. This method will take the sender out of the option leaving None in its place. No additional sender can be retrieved from session client after this call. When sender is dropped respective stream will be closed.

Drops audio sender so that respective stream can be closed.

Returns receiver that can be used to receive streaming detect intents results

Convenience function so that client does not have to create full StreamingDetectIntentRequest and can just pass audio bytes vector instead.

Convenience function to check if DetectIntentResponse represents end of conversation. If so, returns true, otherwise false.

Convenience function to return properly formatted session string for detect intent call.

IMPORTANT: currently streaming_detect_intent does not work properly because half-close operation is not implemented. Details here(go example): https://cloud.google.com/dialogflow/es/docs/how/detect-intent-stream#detect-intent-stream-go

Initiates bidirectional streaming. This call should be spawned into separate tokio task. Results can be then retrieved via channel receiver returned by method get_streaming_result_receiver. IMPORTANT: currently streaming_detect_intent does not work properly because half-close operation is not implemented. Details here(go example): https://cloud.google.com/dialogflow/es/docs/how/detect-intent-stream#detect-intent-stream-go

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Wrap the input message T in a tonic::Request

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.