copilot

package
v1.4.452 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 17 Imported by: 0

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 NewClient

func NewClient() *Client

NewClient creates a new Microsoft 365 Copilot client.

func (*Client) IsConfigured

func (c *Client) IsConfigured() bool

IsConfigured returns true if the client has valid configuration.

func (*Client) ListModels

func (c *Client) ListModels(_ context.Context) ([]string, error)

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.

Jump to

Keyboard shortcuts

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