Class: Labimotion::LabimotionAiAPI

Inherits:
Grape::API
  • Object
show all
Defined in:
lib/labimotion/apis/labimotion_ai_api.rb

Overview

Per-user LabIMotion AI settings: the model, an optional personal API key and an optional provider endpoint of one's own.

They live in our own user_settings table under the 'ai' key (Labimotion::UserAiSettings). The routes stay under /profiles, where clients already reach them, but nothing is stored on the host's profile any more.

The API key is stored encrypted and never returned; a read only reports whether one is set.

Constant Summary collapse

DEFAULT_MODELS =

Fallback model choices when the server config (config/labimotion_ai.yml :models) lists none. A representative subset of the chat-capable KI-Toolbox models (ki-toolbox.scc.kit.edu); the full list lives in the yml.

%w[
  kit.mistral-small-4-119b-a8b
  azure.gpt-4.1-mini
  azure.gpt-4.1
  azure.gpt-5
  azure.gpt-5-mini
  google.claude-sonnet-4.6
  google.claude-haiku-4.5
  google.gemini-2.5-pro
  kit.gpt-oss-120b
].freeze