Compare commits
1 Commits
Home-Menu
...
07ef1a2fad
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07ef1a2fad |
@@ -4,8 +4,12 @@ LLM_ENDPOINT=http://localhost:11434/v1/chat/completions
|
|||||||
# Model name passed to the endpoint
|
# Model name passed to the endpoint
|
||||||
LLM_MODEL=llama3
|
LLM_MODEL=llama3
|
||||||
|
|
||||||
# Optional API key (sent as Bearer token) — leave blank for local servers
|
# Optional API key — value is sent as "Bearer <value>", do NOT include the word "Bearer" here
|
||||||
LLM_API_KEY=
|
LLM_API_KEY=
|
||||||
|
|
||||||
|
# Optional extra headers sent with every LLM request, as a JSON object
|
||||||
|
# Example: LLM_HEADERS={"x-openclaw-agent-id":"jibo"}
|
||||||
|
LLM_HEADERS=
|
||||||
|
|
||||||
# Default system prompt for the voice AI loop
|
# Default system prompt for the voice AI loop
|
||||||
LLM_SYSTEM_PROMPT=You are Jibo, a friendly social robot. Keep responses brief and conversational.
|
LLM_SYSTEM_PROMPT=You are Jibo, a friendly social robot. Keep responses brief and conversational.
|
||||||
|
|||||||
@@ -922,6 +922,10 @@ app.post('/api/llm/chat', async (req, res) => {
|
|||||||
|
|
||||||
const headers = {};
|
const headers = {};
|
||||||
if (apiKey) headers['Authorization'] = `Bearer ${apiKey}`;
|
if (apiKey) headers['Authorization'] = `Bearer ${apiKey}`;
|
||||||
|
try {
|
||||||
|
const extra = process.env.LLM_HEADERS ? JSON.parse(process.env.LLM_HEADERS) : {};
|
||||||
|
Object.assign(headers, extra);
|
||||||
|
} catch { console.warn('[llm] LLM_HEADERS is not valid JSON — ignored'); }
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const result = await httpPost(url, headers, { model: mdl, messages: allMessages, stream: false });
|
const result = await httpPost(url, headers, { model: mdl, messages: allMessages, stream: false });
|
||||||
|
|||||||
Reference in New Issue
Block a user