use crate::provider::{AIProvider, AIResponse, StreamingResponse};
use crate::types::{AIResult, CompletionOptions, Message, AIError};
use async_trait::async_trait;
#[allow(dead_code)]
const MANAGED_API_URL: &str = "https://api.arcacademy.sh/v1/ai";
pub struct ManagedProvider {
#[allow(dead_code)] auth_token: String,
#[allow(dead_code)] client: reqwest::Client,
}
impl ManagedProvider {
pub fn new(auth_token: String) -> Self {
Self {
auth_token,
client: reqwest::Client::new(),
}
}
}
#[async_trait]
impl AIProvider for ManagedProvider {
fn name(&self) -> &str {
"Arc Academy Managed"
}
async fn complete(
&self,
_messages: &[Message],
_options: Option<CompletionOptions>,
) -> AIResult<AIResponse> {
Err(AIError::ApiError("Arc Academy Managed Service is planned for a future release. Please use your own API key for now.".to_string()))
}
async fn stream(
&self,
_messages: &[Message],
_options: Option<CompletionOptions>,
) -> AIResult<StreamingResponse> {
Err(AIError::ApiError("Service not yet available".to_string()))
}
async fn health_check(&self) -> AIResult<bool> {
Ok(true)
}
async fn list_models(&self) -> AIResult<Vec<String>> {
Ok(vec!["arc-academy-default".to_string()])
}
}