Documentation
¶
Overview ¶
Package copilot provides integration with Microsoft 365 Copilot Chat API. This vendor allows Fabric to interact with Microsoft 365 Copilot, which provides AI capabilities grounded in your organization's Microsoft 365 data.
Requirements: - Microsoft 365 Copilot license for each user - Microsoft 365 E3 or E5 subscription (or equivalent) - Azure AD app registration with appropriate permissions
The Chat API is currently in preview and requires delegated (work or school account) permissions. Application permissions are not supported.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
*plugins.PluginBase
// Configuration
TenantID *plugins.SetupQuestion
ClientID *plugins.SetupQuestion
ClientSecret *plugins.SetupQuestion
AccessToken *plugins.SetupQuestion
RefreshToken *plugins.SetupQuestion
ApiBaseURL *plugins.SetupQuestion
TimeZone *plugins.SetupQuestion
// contains filtered or unexported fields
}
Client represents a Microsoft 365 Copilot API client.
func (*Client) IsConfigured ¶
IsConfigured returns true if the client has valid configuration.
func (*Client) ListModels ¶
ListModels returns the available models. Microsoft 365 Copilot exposes a single model - the Copilot service itself.
func (*Client) Send ¶
func (c *Client) Send(ctx context.Context, msgs []*chat.ChatCompletionMessage, opts *domain.ChatOptions) (string, error)
Send sends a message to Copilot and returns the response.
func (*Client) SendStream ¶
func (c *Client) SendStream(_ context.Context, msgs []*chat.ChatCompletionMessage, opts *domain.ChatOptions, channel chan domain.StreamUpdate) error
SendStream sends a message to Copilot and streams the response.