Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithHTTPClient ¶
func WithTokenCache ¶
Types ¶
type ChatRequest ¶
type ChatResponse ¶
type ChatResponseFunc ¶
type ChatResponseFunc func(ChatResponse) error
ChatResponseFunc is a function that is called for each chat response.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ChatCompletions ¶
func (c *Client) ChatCompletions(ctx context.Context, token string, chatRequest *ChatRequest, fn ChatResponseFunc) error
ChatCompletions sends a chat request to the GitHub Copilot API.
type FilterResult ¶
type TokenResponse ¶
type TokenResponse struct {
ExpiresAt int64 `json:"expires_at"`
Token string `json:"token"`
AnnotationsEnabled bool `json:"annotations_enabled"`
ChatEnabled bool `json:"chat_enabled"`
ChatJetbrains bool `json:"chat_jetbrains_enabled"`
CodeQuoteEnabled bool `json:"code_quote_enabled"`
CopilotIDEAgent bool `json:"copilot_ide_agent_chat_gpt4_small_prompt"`
CopilotIgnore bool `json:"copilotignore_enabled"`
IntellijEditor bool `json:"intellij_editor_fetcher"`
Prompt8k bool `json:"prompt_8k"`
PublicSuggestions string `json:"public_suggestions"`
RefreshIn int64 `json:"refresh_in"`
Sku string `json:"sku"`
SnippyLoadTest bool `json:"snippy_load_test_enabled"`
Telemetry string `json:"telemetry"`
TrackingID string `json:"tracking_id"`
VSCPanel bool `json:"vsc_panel_v2"`
}
Click to show internal directories.
Click to hide internal directories.