Replace repository with DuckLM runtime
This commit is contained in:
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
BASE_URL="${DUCK_API_URL:-http://127.0.0.1:8000}"
|
||||
|
||||
curl -fsS "${BASE_URL}/health"
|
||||
|
||||
curl -fsS -X POST "${BASE_URL}/v1/chat" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"message": "Скажи коротко, что ты DuckLM",
|
||||
"debug": true
|
||||
}'
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
BASE_URL="${DUCK_API_URL:-http://127.0.0.1:8000}"
|
||||
curl -fsS "${BASE_URL}/v1/experience"
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
BASE_URL="${DUCK_API_URL:-http://127.0.0.1:8000}"
|
||||
|
||||
RESPONSE="$(curl -fsS -X POST "${BASE_URL}/v1/chat" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"message": "Создай tmp/duck_test_note.md с текстом hello duck и прочитай его обратно",
|
||||
"workspace": "./workspace",
|
||||
"debug": true
|
||||
}')"
|
||||
|
||||
echo "${RESPONSE}"
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
BASE_URL="${DUCK_API_URL:-http://127.0.0.1:8000}"
|
||||
curl -fsS "${BASE_URL}/v1/memory/search?q=duck"
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
BASE_URL="${DUCK_API_URL:-http://127.0.0.1:8000}"
|
||||
curl -fsS "${BASE_URL}/v1/models/roles"
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
BASE_URL="${DUCK_API_URL:-http://127.0.0.1:8000}"
|
||||
curl -fsS "${BASE_URL}/v1/skills"
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
python3 - <<'PY'
|
||||
import asyncio
|
||||
from duck_core.tools.shell_exec_safe import ShellExecSafeTool
|
||||
|
||||
async def main():
|
||||
result = await ShellExecSafeTool(".").run({"command": "rm -rf ."})
|
||||
assert not result.ok
|
||||
print("OK: dangerous command blocked")
|
||||
|
||||
asyncio.run(main())
|
||||
PY
|
||||
Reference in New Issue
Block a user