Class: Askcii::ConfigurationManager

Inherits:
Object
  • Object
show all
Defined in:
lib/askcii/configuration_manager.rb

Constant Summary collapse

PROVIDER_MAP =
{
  '1' => 'openai',
  '2' => 'anthropic',
  '3' => 'gemini',
  '4' => 'deepseek',
  '5' => 'openrouter',
  '6' => 'ollama'
}.freeze
DEFAULT_ENDPOINTS =
{
  'openai' => 'https://api.openai.com/v1',
  'anthropic' => 'https://api.anthropic.com',
  'gemini' => 'https://generativelanguage.googleapis.com/v1',
  'deepseek' => 'https://api.deepseek.com/v1',
  'openrouter' => 'https://openrouter.ai/api/v1',
  'ollama' => 'http://localhost:11434/v1'
}.freeze
PROVIDER_MODELS =
{
  'openai' => {
    default: 'gpt-4o',
    models: [
      'gpt-4o',
      'gpt-4o-mini',
      'gpt-4-turbo',
      'gpt-4',
      'gpt-3.5-turbo'
    ]
  },
  'anthropic' => {
    default: 'claude-3-5-sonnet-20241022',
    models: [
      'claude-3-5-sonnet-20241022',
      'claude-3-5-haiku-20241022',
      'claude-3-opus-20240229',
      'claude-3-sonnet-20240229',
      'claude-3-haiku-20240307'
    ]
  },
  'gemini' => {
    default: 'gemini-pro',
    models: [
      'gemini-pro',
      'gemini-pro-vision',
      'gemini-1.5-pro',
      'gemini-1.5-flash'
    ]
  },
  'deepseek' => {
    default: 'deepseek-chat',
    models: %w[
      deepseek-chat
      deepseek-coder
    ]
  },
  'openrouter' => {
    default: 'anthropic/claude-3.5-sonnet',
    models: [
      'anthropic/claude-3.5-sonnet',
      'openai/gpt-4o',
      'google/gemini-pro',
      'meta-llama/llama-3.1-405b-instruct',
      'anthropic/claude-3-opus',
      'openai/gpt-4-turbo'
    ]
  },
  'ollama' => {
    default: 'llama3.2',
    models: [
      'llama3.2',
      'llama3.1',
      'mistral',
      'codellama',
      'phi3',
      'gemma2'
    ]
  }
}.freeze

Instance Method Summary collapse

Instance Method Details

#runObject



84
85
86
87
88
# File 'lib/askcii/configuration_manager.rb', line 84

def run
  show_current_configurations
  show_menu
  handle_user_choice
end