Documentation ¶
Index ¶
- type Assistant
- func (a *Assistant) AudioIn(audioIn []byte) error
- func (a *Assistant) Close()
- func (a *Assistant) Initialize(credentials *Token, oauthToken *oauth2.Token) error
- func (a *Assistant) InitializeRaw(assistConfig *embedded.ConverseRequest_Config, audioBuffer *AudioBuffer, ...) error
- func (a *Assistant) RequestResponse() (*embedded.ConverseResponse, error)
- func (a *Assistant) Start() error
- type AudioBuffer
- type GCPAuthWrapper
- type PermissionCallback
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assistant ¶
type Assistant struct { GoogleAssistant embedded.EmbeddedAssistantClient Config *embedded.ConverseRequest_Config AudioBuffer *AudioBuffer Canceler context.CancelFunc Connection *grpc.ClientConn Context context.Context Conversation embedded.EmbeddedAssistant_ConverseClient ConversationConfiguration *embedded.ConverseConfig ConversationState []byte GCPAuth *GCPAuthWrapper }
func NewAssistant ¶
func NewAssistant() *Assistant
func (*Assistant) Initialize ¶
func (*Assistant) InitializeRaw ¶
func (*Assistant) RequestResponse ¶
func (a *Assistant) RequestResponse() (*embedded.ConverseResponse, error)
RequestResponse requests a response based on the available input audio data
type AudioBuffer ¶
type AudioBuffer struct { AudioInEncoding embedded.AudioInConfig_Encoding AudioInSampleRateHertz int32 AudioOutEncoding embedded.AudioOutConfig_Encoding AudioOutSampleRateHertz int32 AudioOutVolumePercentage int32 }
type GCPAuthWrapper ¶
type GCPAuthWrapper struct { AuthURL string CallbackFunc PermissionCallback Config *oauth2.Config OauthSrv *http.Server OauthToken *oauth2.Token PermissionCode string AuthError error }
func (*GCPAuthWrapper) Error ¶
func (w *GCPAuthWrapper) Error() error
func (*GCPAuthWrapper) Initialize ¶
func (w *GCPAuthWrapper) Initialize(credentials *Token, oauthRedirectURL string, callbackFunc PermissionCallback) error
func (*GCPAuthWrapper) SetTokenSource ¶
func (w *GCPAuthWrapper) SetTokenSource(permissionCode string) error
type PermissionCallback ¶
type Token ¶
type Token struct { Installed struct { ClientID string `json:"client_id"` ProjectID string `json:"project_id"` AuthURI string `json:"auth_uri"` TokenURI string `json:"token_uri"` AuthProviderX509CertURL string `json:"auth_provider_x509_cert_url"` ClientSecret string `json:"client_secret"` RedirectUris []string `json:"redirect_uris"` } `json:"installed"` }
func GetCredentialsFromFile ¶
Click to show internal directories.
Click to hide internal directories.