copilot

package
v1.66.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

* ChatCLI - Command Line Interface for LLM interaction * Copyright (c) 2024 Edilson Freitas * License: MIT

Index

Constants

View Source
const (
	// CopilotAPIBaseURL is the base URL for the GitHub Copilot Chat API.
	CopilotAPIBaseURL = "https://api.githubcopilot.com"

	// CopilotChatCompletionsPath is the chat completions endpoint.
	CopilotChatCompletionsPath = "/chat/completions"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client implements the LLMClient interface for GitHub Copilot.

func NewClient

func NewClient(token, model string, logger *zap.Logger, maxAttempts int, backoff time.Duration) *Client

NewClient creates a new GitHub Copilot client.

func (*Client) GetModelName

func (c *Client) GetModelName() string

GetModelName returns the friendly display name for the model via catalog.

func (*Client) SendPrompt

func (c *Client) SendPrompt(ctx context.Context, prompt string, history []models.Message, maxTokens int) (string, error)

SendPrompt sends a prompt to the GitHub Copilot API and returns the response.

Jump to

Keyboard shortcuts

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