Cloud LLM Fallback (Anthropic Claude)
For hardware environments that cannot comfortably host a 3B+ LLM locally, AI Friend provides an optional, provider-agnostic Cloud LLM Fallback adapter.
Configuration
In your .env file, set:
ini
LLM_PROVIDER=anthropic
ANTHROPIC_API_KEY=sk-ant-api03-...
ANTHROPIC_MODEL=claude-3-5-sonnet-20241022Endocrine Parameter Translation
Unlike simple LLM wrappers, the AnthropicClient adapter (backend/app/llm/anthropic_client.py) translates internal affective endocrine states into cloud API sampling parameters:
temperatureis modulated by Cortisol ().top_pis modulated by Dopamine ().max_tokensis bounded by Fatigue.- System prompts carry the identical 3-Tier Persona boundary and friction directives.
Privacy Notice
[!WARNING] Setting
LLM_PROVIDER=anthropictransmits conversation turns over HTTPS to Anthropic servers. This is an explicit opt-in choice for users who trade local containment for higher inference speed or model intelligence.