struct

Crig::Providers::Copilot::Client

Inherits Crig::Client::EmbeddingsClient < Crig::Client::CompletionClient < Struct < Value < Object

Constructors

from_env
Source
from_val(token : String) : self
Source
new(access_token : String, base_url : String = GITHUB_COPILOT_API_BASE_URL)
Source

Class methods

builder
Source

Instance methods

access_token
Source
base_url
Source
build_uri(path : String) : String
Source
embedding_model_with_ndims(model : String, ndims : Int32) : Crig::Providers::Copilot::EmbeddingModel
Source
oauth_authenticate(authenticator : OAuth::Authenticator) : Nil

Trigger the OAuth device-code flow. Resolves when user authorizes.

Source
post_json(path : String, body : String, headers : Hash(String, String) = {} of String => String) : HTTP::Client::Response
Source