diff --git a/README.md b/README.md index 4fd71ab..acddfd8 100644 --- a/README.md +++ b/README.md @@ -253,7 +253,7 @@ The editor mode supports the following subset of POSIX ed commands in the standa ### `app.llmchat` -A simple interactive chat with remote LLMs. Configured via `llmcfg.json` (see the `deck.llm` module reference) placed into the storage root. Run with the single `llmchat()` method it exports. +A simple interactive chat with remote LLMs. Configured via `llmcfg.json` (see the `deck.llm` module reference and the `llmcfg.example.json` file) placed into the storage root. Run with the single `llmchat()` method it exports. Supported chat commands: diff --git a/deck/llm.py b/deck/llm.py index 301338b..7b484ae 100644 --- a/deck/llm.py +++ b/deck/llm.py @@ -105,7 +105,7 @@ class LLMChat: sleeptime = float(re.search(r'\d+\.\d+', restext).group(0)) except: pass - time.sleep(sleeptime) + time.sleep(sleeptime + 0.1) return self.guarded_post(url, headers, payload) else: data = response.json() diff --git a/llmcfg.example.json b/llmcfg.example.json new file mode 100644 index 0000000..aef4588 --- /dev/null +++ b/llmcfg.example.json @@ -0,0 +1,29 @@ +{ + "reasoning_enabled": false, + "temperature": 0.7, + "active_provider": "deepinfra", + "providers": { + "pollinations": { + "base_url": "https://text.pollinations.ai/openai", + "api_key": "", + "model": "openai-fast", + "extra_headers": {} + }, + "deepinfra": { + "base_url": "https://api.deepinfra.com/v1/openai", + "api_key": "", + "model": "MiniMaxAI/MiniMax-M2", + "extra_headers": { + "Origin": "https://deepinfra.com", + "Referer": "https://deepinfra.com/", + "X-Deepinfra-Source": "web-page" + } + }, + "airforce": { + "base_url": "https://api.airforce/v1", + "api_key": "", + "model": "gemini-3-flash", + "extra_headers": {} + }, + "system_prompt": "You are a concise, embedded assistant." + }