Documentation ¶
Index ¶
- type ResourceGetter
- type Service
- func (a *Service) CreateAssistantConversation(ctx context.Context, req *assist.CreateAssistantConversationRequest) (*assist.CreateAssistantConversationResponse, error)
- func (a *Service) CreateAssistantMessage(ctx context.Context, req *assist.CreateAssistantMessageRequest) (*emptypb.Empty, error)
- func (a *Service) DeleteAssistantConversation(ctx context.Context, req *assist.DeleteAssistantConversationRequest) (*emptypb.Empty, error)
- func (a *Service) GetAssistantConversations(ctx context.Context, req *assist.GetAssistantConversationsRequest) (*assist.GetAssistantConversationsResponse, error)
- func (a *Service) GetAssistantEmbeddings(ctx context.Context, msg *assist.GetAssistantEmbeddingsRequest) (*assist.GetAssistantEmbeddingsResponse, error)
- func (a *Service) GetAssistantMessages(ctx context.Context, req *assist.GetAssistantMessagesRequest) (*assist.GetAssistantMessagesResponse, error)
- func (a *Service) IsAssistEnabled(ctx context.Context, _ *assist.IsAssistEnabledRequest) (*assist.IsAssistEnabledResponse, error)
- func (a *Service) SearchUnifiedResources(ctx context.Context, msg *assist.SearchUnifiedResourcesRequest) (*assist.SearchUnifiedResourcesResponse, error)
- func (a *Service) UpdateAssistantConversationInfo(ctx context.Context, req *assist.UpdateAssistantConversationInfoRequest) (*emptypb.Empty, error)
- type ServiceConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResourceGetter ¶
type ResourceGetter interface { GetNode(ctx context.Context, namespace, name string) (types.Server, error) GetKubernetesCluster(ctx context.Context, name string) (types.KubeCluster, error) GetApp(ctx context.Context, name string) (types.Application, error) GetDatabase(ctx context.Context, name string) (types.Database, error) GetWindowsDesktops(ctx context.Context, filter types.WindowsDesktopFilter) ([]types.WindowsDesktop, error) }
ResourceGetter represents a subset of the auth.Cache interface. Created to avoid circular dependencies.
type Service ¶
type Service struct { assist.UnimplementedAssistServiceServer assist.UnimplementedAssistEmbeddingServiceServer // contains filtered or unexported fields }
Service implements the teleport.assist.v1.AssistService RPC service.
func NewService ¶
func NewService(cfg *ServiceConfig) (*Service, error)
NewService returns a new assist gRPC service.
func (*Service) CreateAssistantConversation ¶
func (a *Service) CreateAssistantConversation(ctx context.Context, req *assist.CreateAssistantConversationRequest) (*assist.CreateAssistantConversationResponse, error)
CreateAssistantConversation creates a new conversation entry in the backend.
func (*Service) CreateAssistantMessage ¶
func (a *Service) CreateAssistantMessage(ctx context.Context, req *assist.CreateAssistantMessageRequest) (*emptypb.Empty, error)
CreateAssistantMessage adds the message to the backend.
func (*Service) DeleteAssistantConversation ¶
func (a *Service) DeleteAssistantConversation(ctx context.Context, req *assist.DeleteAssistantConversationRequest) (*emptypb.Empty, error)
DeleteAssistantConversation deletes a conversation entry and associated messages from the backend.
func (*Service) GetAssistantConversations ¶
func (a *Service) GetAssistantConversations(ctx context.Context, req *assist.GetAssistantConversationsRequest) (*assist.GetAssistantConversationsResponse, error)
GetAssistantConversations returns all conversations started by a user.
func (*Service) GetAssistantEmbeddings ¶
func (*Service) GetAssistantMessages ¶
func (a *Service) GetAssistantMessages(ctx context.Context, req *assist.GetAssistantMessagesRequest) (*assist.GetAssistantMessagesResponse, error)
GetAssistantMessages returns all messages with given conversation ID.
func (*Service) IsAssistEnabled ¶
func (a *Service) IsAssistEnabled(ctx context.Context, _ *assist.IsAssistEnabledRequest) (*assist.IsAssistEnabledResponse, error)
IsAssistEnabled returns true if the assist is enabled or not on the auth level.
type ServiceConfig ¶
type ServiceConfig struct { Backend services.Assistant Embeddings *ai.SimpleRetriever Embedder embeddinglib.Embedder Authorizer authz.Authorizer Logger *logrus.Entry ResourceGetter ResourceGetter }
ServiceConfig holds configuration options for the assist gRPC service.