copilot

package
v0.0.0-beta Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package copilot implements the GitHub Copilot dual-protocol provider.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is the GitHub Copilot provider. It routes requests to either an embedded OpenAI or Anthropic client based on each model's supported endpoints.

func New

func New(token string, timeout time.Duration) *Client

New creates a Copilot client authenticating with the given GitHub OAuth token.

func (*Client) Chat

Chat routes the request to the appropriate underlying provider based on the model's supported endpoints.

func (*Client) Estimate

func (c *Client) Estimate(_ context.Context, _ request.Request, _ string) (int, error)

Estimate is not supported by the Copilot provider.

func (*Client) Model

func (c *Client) Model(ctx context.Context, name string) (model.Model, error)

Model returns metadata for a specific model by name.

func (*Client) Models

func (c *Client) Models(ctx context.Context) (model.Models, error)

Models returns all Copilot models that support /responses or /v1/messages endpoints.

Jump to

Keyboard shortcuts

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