somratpro commited on
Commit
08d8db1
·
1 Parent(s): 777fb99

Document and map Gemini model config

Browse files
Files changed (2) hide show
  1. README.md +44 -0
  2. start.sh +2 -0
README.md CHANGED
@@ -46,6 +46,50 @@ HuggingMess runs [Nous Research Hermes Agent](https://github.com/NousResearch/he
46
  | `CLOUDFLARE_WORKERS_TOKEN` | Optional | Auto-creates a Worker proxy for Telegram Bot API traffic |
47
  | `UPTIMEROBOT_API_KEY` | Optional | Auto-creates a monitor for `/health` |
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  ## Telegram on HF Spaces
50
 
51
  When `TELEGRAM_BOT_TOKEN` and `SPACE_HOST` are present, HuggingMess defaults Telegram to webhook mode:
 
46
  | `CLOUDFLARE_WORKERS_TOKEN` | Optional | Auto-creates a Worker proxy for Telegram Bot API traffic |
47
  | `UPTIMEROBOT_API_KEY` | Optional | Auto-creates a monitor for `/health` |
48
 
49
+ ## LLM Providers
50
+
51
+ HuggingMess supports two configuration styles:
52
+
53
+ 1. **Simple wrapper style:** set `LLM_MODEL` and `LLM_API_KEY`; HuggingMess maps them into Hermes config and provider-specific API key variables.
54
+ 2. **Native Hermes style:** set Hermes variables directly, such as `HERMES_MODEL`, `HERMES_INFERENCE_PROVIDER`, and the provider API key.
55
+
56
+ ### Gemini
57
+
58
+ For Google Gemini, add these Space secrets:
59
+
60
+ | Secret | Value |
61
+ | :--- | :--- |
62
+ | `LLM_MODEL` | `google/gemini-2.5-flash` |
63
+ | `LLM_API_KEY` | Your Google AI Studio API key |
64
+
65
+ HuggingMess will convert that into Hermes config:
66
+
67
+ ```yaml
68
+ model:
69
+ default: gemini-2.5-flash
70
+ provider: gemini
71
+ ```
72
+
73
+ And it exports both `GOOGLE_API_KEY` and `GEMINI_API_KEY` for Hermes. You can also use `gemini/gemini-2.5-flash`; the prefix is stripped the same way.
74
+
75
+ Native Hermes equivalent:
76
+
77
+ | Secret | Value |
78
+ | :--- | :--- |
79
+ | `HERMES_MODEL` | `gemini-2.5-flash` |
80
+ | `HERMES_INFERENCE_PROVIDER` | `gemini` |
81
+ | `GOOGLE_API_KEY` or `GEMINI_API_KEY` | Your Google AI Studio API key |
82
+
83
+ ### Common Examples
84
+
85
+ | Provider | Simple `LLM_MODEL` | API key secret |
86
+ | :--- | :--- | :--- |
87
+ | Gemini | `google/gemini-2.5-flash` | `LLM_API_KEY` |
88
+ | OpenRouter | `openrouter/anthropic/claude-sonnet-4` | `LLM_API_KEY` |
89
+ | Anthropic | `anthropic/claude-opus-4.6` | `LLM_API_KEY` |
90
+ | OpenAI | `openai/gpt-4o` | `LLM_API_KEY` |
91
+ | Hugging Face Router | `huggingface/meta-llama/Llama-3.3-70B-Instruct` | `LLM_API_KEY` |
92
+
93
  ## Telegram on HF Spaces
94
 
95
  When `TELEGRAM_BOT_TOKEN` and `SPACE_HOST` are present, HuggingMess defaults Telegram to webhook mode:
start.sh CHANGED
@@ -124,6 +124,8 @@ case "$MODEL_PREFIX" in
124
  ;;
125
  google|gemini)
126
  [ -n "$LLM_API_KEY" ] && export GOOGLE_API_KEY="${GOOGLE_API_KEY:-$LLM_API_KEY}" GEMINI_API_KEY="${GEMINI_API_KEY:-$LLM_API_KEY}"
 
 
127
  ;;
128
  deepseek)
129
  [ -n "$LLM_API_KEY" ] && export DEEPSEEK_API_KEY="${DEEPSEEK_API_KEY:-$LLM_API_KEY}"
 
124
  ;;
125
  google|gemini)
126
  [ -n "$LLM_API_KEY" ] && export GOOGLE_API_KEY="${GOOGLE_API_KEY:-$LLM_API_KEY}" GEMINI_API_KEY="${GEMINI_API_KEY:-$LLM_API_KEY}"
127
+ [ "$PROVIDER_FOR_CONFIG" = "auto" ] && PROVIDER_FOR_CONFIG="gemini"
128
+ MODEL_FOR_CONFIG="${MODEL_INPUT#*/}"
129
  ;;
130
  deepseek)
131
  [ -n "$LLM_API_KEY" ] && export DEEPSEEK_API_KEY="${DEEPSEEK_API_KEY:-$LLM_API_KEY}"