feat: Support authenticating or refreshing OAuth for supported clients from within the REPL
This commit is contained in:
@@ -27,7 +27,7 @@ pub struct ClaudeConfig {
|
||||
impl ClaudeClient {
|
||||
config_get_fn!(api_key, get_api_key);
|
||||
config_get_fn!(api_base, get_api_base);
|
||||
|
||||
|
||||
create_oauth_supported_client_config!();
|
||||
}
|
||||
|
||||
@@ -35,6 +35,10 @@ impl ClaudeClient {
|
||||
impl Client for ClaudeClient {
|
||||
client_common_fns!();
|
||||
|
||||
fn supports_oauth(&self) -> bool {
|
||||
self.config.auth.as_deref() == Some("oauth")
|
||||
}
|
||||
|
||||
async fn chat_completions_inner(
|
||||
&self,
|
||||
client: &ReqwestClient,
|
||||
|
||||
Reference in New Issue
Block a user