use anyhow::Result;
use clap::{Args, Subcommand};
#[derive(Debug, Clone, Subcommand)]
pub enum EnhancedAICommand {
Chat(ChatArgs),
Embeddings(EmbeddingsArgs),
}
#[derive(Debug, Clone, Args)]
pub struct ChatArgs {
#[arg(short, long)]
pub prompt: String,
#[arg(short, long, default_value = "gpt-4o")]
pub model: String,
}
#[derive(Debug, Clone, Args)]
pub struct EmbeddingsArgs {
#[arg(short, long)]
pub input: Vec<String>,
#[arg(short, long, default_value = "text-embedding-3-large")]
pub model: String,
}
impl EnhancedAICommand {
pub async fn execute(&self) -> Result<()> {
match self {
EnhancedAICommand::Chat(args) => {
println!(" Chat with model: {}", args.model);
println!("Prompt: {}", args.prompt);
Ok(())
}
EnhancedAICommand::Embeddings(args) => {
println!("Generating embeddings with model: {}", args.model);
println!("Input count: {}", args.input.len());
Ok(())
}
}
}
}