server

package
v1.5.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2024 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*options)

Option is the list of options

func WithIntentGraphProcessor

func WithIntentGraphProcessor(s intentGraphProcessor) Option

WithKnowledgeGraphProcessor sets the knowledge graph processor

func WithIntentProcessor

func WithIntentProcessor(s intentProcessor) Option

WithIntentProcessor sets the intent processor

func WithKnowledgeGraphProcessor

func WithKnowledgeGraphProcessor(s kgProcessor) Option

WithKnowledgeGraphProcessor sets the knowledge graph processor

func WithLogger

func WithLogger(l log.Logger) Option

WithLogger sets the logger

type Server

type Server struct {
	pb.UnimplementedChipperGrpcServer
	// contains filtered or unexported fields
}

Server defines the service used.

func New

func New(opts ...Option) (*Server, error)

New accepts a list of args and returns the service

func (*Server) StreamingConnectionCheck

func (s *Server) StreamingConnectionCheck(stream pb.ChipperGrpc_StreamingConnectionCheckServer) error

StreamingConnectionCheck is used by the end device to make sure it can successfully communicate

func (*Server) StreamingIntent

func (s *Server) StreamingIntent(stream pb.ChipperGrpc_StreamingIntentServer) error

StreamingIntent handles voice streams

func (*Server) StreamingIntentGraph

func (s *Server) StreamingIntentGraph(stream pb.ChipperGrpc_StreamingIntentGraphServer) error

StreamingIntentGraph handles intent graph request streams

func (*Server) StreamingKnowledgeGraph

func (s *Server) StreamingKnowledgeGraph(stream pb.ChipperGrpc_StreamingKnowledgeGraphServer) error

StreamingKnowledgeGraph is used for knowledge graph request/responses

func (*Server) TextIntent

func (s *Server) TextIntent(ctx context.Context, req *pb.TextRequest) (*pb.IntentResponse, error)

TextIntent handles text-based request/responses from the device

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL