pub struct GitHubCopilotConfig {
pub token_dir: Option<String>,
pub access_token_file: Option<String>,
pub api_key_file: Option<String>,
pub api_base: Option<String>,
pub timeout: u64,
pub max_retries: u32,
pub disable_system_to_assistant: bool,
pub debug: bool,
}Expand description
GitHub Copilot provider configuration
Fields§
§token_dir: Option<String>Token directory for storing access tokens
access_token_file: Option<String>Access token file name
api_key_file: Option<String>API key file name
api_base: Option<String>API base URL (default: https://api.githubcopilot.com)
timeout: u64Request timeout in seconds
max_retries: u32Maximum number of retries for failed requests
disable_system_to_assistant: boolWhether to disable converting system messages to assistant messages
debug: boolWhether to enable debug logging
Implementations§
Source§impl GitHubCopilotConfig
impl GitHubCopilotConfig
Sourcepub fn get_token_dir(&self) -> String
pub fn get_token_dir(&self) -> String
Get token directory with environment variable fallback
Sourcepub fn get_access_token_file(&self) -> String
pub fn get_access_token_file(&self) -> String
Get access token file name with environment variable fallback
Sourcepub fn get_api_key_file(&self) -> String
pub fn get_api_key_file(&self) -> String
Get API key file name with environment variable fallback
Sourcepub fn get_api_base(&self) -> String
pub fn get_api_base(&self) -> String
Get API base with environment variable fallback
Trait Implementations§
Source§impl Clone for GitHubCopilotConfig
impl Clone for GitHubCopilotConfig
Source§impl Debug for GitHubCopilotConfig
impl Debug for GitHubCopilotConfig
Source§impl Default for GitHubCopilotConfig
impl Default for GitHubCopilotConfig
Source§impl<'de> Deserialize<'de> for GitHubCopilotConfig
impl<'de> Deserialize<'de> for GitHubCopilotConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl ProviderConfig for GitHubCopilotConfig
impl ProviderConfig for GitHubCopilotConfig
Source§fn max_retries(&self) -> u32
fn max_retries(&self) -> u32
Get maximum retry attempts Read more
Source§fn endpoint_access(&self) -> ProviderEndpointAccess
fn endpoint_access(&self) -> ProviderEndpointAccess
Network scope allowed for this provider’s configured endpoint.
Source§fn use_ssrf_safe_client(&self) -> bool
fn use_ssrf_safe_client(&self) -> bool
Whether this provider requires an SSRF-safe HTTP client. Read more
Auto Trait Implementations§
impl Freeze for GitHubCopilotConfig
impl RefUnwindSafe for GitHubCopilotConfig
impl Send for GitHubCopilotConfig
impl Sync for GitHubCopilotConfig
impl Unpin for GitHubCopilotConfig
impl UnsafeUnpin for GitHubCopilotConfig
impl UnwindSafe for GitHubCopilotConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> BudgetAwareRouting for T
impl<T> BudgetAwareRouting for T
Source§fn filter_by_budget(
&self,
providers: Vec<String>,
budget_router: &BudgetAwareRouter,
) -> Vec<String>
fn filter_by_budget( &self, providers: Vec<String>, budget_router: &BudgetAwareRouter, ) -> Vec<String>
Filter providers based on budget availability
Source§impl<T> CacheValue for T
impl<T> CacheValue for T
Source§fn from_bytes(bytes: &[u8]) -> Result<T, CacheError>
fn from_bytes(bytes: &[u8]) -> Result<T, CacheError>
Deserialize from bytes
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.