feat: add support for custom thinking effort (resolves #6)
All checks were successful
Lint and Syntax Check / build (pull_request) Successful in 1m45s
All checks were successful
Lint and Syntax Check / build (pull_request) Successful in 1m45s
This commit is contained in:
@@ -19,6 +19,7 @@ The following environment variables are required for the service to function:
|
|||||||
| `OPENCLAW_URL` | The endpoint URL for the OpenClaw API. (with hook path) |
|
| `OPENCLAW_URL` | The endpoint URL for the OpenClaw API. (with hook path) |
|
||||||
| `OPENCLAW_TOKEN` | The authentication token for OpenClaw. (from hooks, not gateway ui) |
|
| `OPENCLAW_TOKEN` | The authentication token for OpenClaw. (from hooks, not gateway ui) |
|
||||||
| `OPENCLAW_PROXY_AUTH` | (Optional) Proxy credentials in `username:password` format. |
|
| `OPENCLAW_PROXY_AUTH` | (Optional) Proxy credentials in `username:password` format. |
|
||||||
|
| `OPENCLAW_THINKING` | (Optional) The thinking effort for the agent (e.g., `low`, `medium`, `high`). Defaults to `low`. |
|
||||||
| `DATABASE_STORAGE_NAME` | The name of the database storage to use. |
|
| `DATABASE_STORAGE_NAME` | The name of the database storage to use. |
|
||||||
| `AGENT_USERNAME` | The Gitea username of the AI agent (e.g., `whateveryouragentisnamed`). |
|
| `AGENT_USERNAME` | The Gitea username of the AI agent (e.g., `whateveryouragentisnamed`). |
|
||||||
| `AGENT_PROMPT_FILE` | (Optional) Path to a custom Markdown template for notifications. If not provided, a default template will be used. |
|
| `AGENT_PROMPT_FILE` | (Optional) Path to a custom Markdown template for notifications. If not provided, a default template will be used. |
|
||||||
|
|||||||
3
main.py
3
main.py
@@ -7,6 +7,7 @@ OPENCLAW_URL = os.getenv("OPENCLAW_URL")
|
|||||||
OPENCLAW_TOKEN = os.getenv("OPENCLAW_TOKEN")
|
OPENCLAW_TOKEN = os.getenv("OPENCLAW_TOKEN")
|
||||||
OPENCLAW_PROXY_AUTH = os.getenv("OPENCLAW_PROXY_AUTH")
|
OPENCLAW_PROXY_AUTH = os.getenv("OPENCLAW_PROXY_AUTH")
|
||||||
OPENCLAW_MODEL = os.getenv("OPENCLAW_MODEL")
|
OPENCLAW_MODEL = os.getenv("OPENCLAW_MODEL")
|
||||||
|
OPENCLAW_THINKING = os.getenv("OPENCLAW_THINKING", "low")
|
||||||
DATABASE_STORAGE = os.getenv("DATABASE_STORAGE_NAME")
|
DATABASE_STORAGE = os.getenv("DATABASE_STORAGE_NAME")
|
||||||
AGENT_USERNAME = os.getenv("AGENT_USERNAME")
|
AGENT_USERNAME = os.getenv("AGENT_USERNAME")
|
||||||
AGENT_PROMPT_FILE = os.getenv("AGENT_PROMPT_FILE")
|
AGENT_PROMPT_FILE = os.getenv("AGENT_PROMPT_FILE")
|
||||||
@@ -166,7 +167,7 @@ def sendToAgent(event_object):
|
|||||||
headers=headers,
|
headers=headers,
|
||||||
json={
|
json={
|
||||||
"message": message,
|
"message": message,
|
||||||
"thinking": "low",
|
"thinking": OPENCLAW_THINKING,
|
||||||
"model": OPENCLAW_MODEL,
|
"model": OPENCLAW_MODEL,
|
||||||
"deliver": False,
|
"deliver": False,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user