@charivo/llm-provider-openclaw 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -0
- package/package.json +12 -3
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @charivo/llm-provider-openclaw
|
|
2
|
+
|
|
3
|
+
Server-side OpenClaw provider for Charivo.
|
|
4
|
+
|
|
5
|
+
This provider uses OpenClaw's OpenAI-compatible HTTP API. In browser apps, put
|
|
6
|
+
it behind your own server route and call that route from `@charivo/llm-client-remote`.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pnpm add @charivo/llm-provider-openclaw
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
import { createOpenClawLLMProvider } from "@charivo/llm-provider-openclaw";
|
|
18
|
+
|
|
19
|
+
const provider = createOpenClawLLMProvider({
|
|
20
|
+
token: process.env.OPENCLAW_TOKEN!,
|
|
21
|
+
baseURL: process.env.OPENCLAW_BASE_URL,
|
|
22
|
+
agentId: process.env.OPENCLAW_AGENT_ID,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const message = await provider.generateResponse([
|
|
26
|
+
{ role: "user", content: "Hello" },
|
|
27
|
+
]);
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Config
|
|
31
|
+
|
|
32
|
+
- `token`
|
|
33
|
+
- `baseURL?` default: `http://127.0.0.1:18789/v1`
|
|
34
|
+
- `agentId?` default: `main`
|
|
35
|
+
- `model?` default: `openclaw`
|
|
36
|
+
- `temperature?` default: `0.7`
|
|
37
|
+
- `maxTokens?` default: `1000`
|
|
38
|
+
- `dangerouslyAllowBrowser?` testing only
|
package/package.json
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@charivo/llm-provider-openclaw",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "OpenClaw LLM provider for Charivo (server-side)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
6
7
|
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
7
15
|
"dependencies": {
|
|
8
16
|
"openai": "^4.47.1",
|
|
9
|
-
"@charivo/core": "0.0
|
|
17
|
+
"@charivo/core": "0.1.0"
|
|
10
18
|
},
|
|
11
19
|
"devDependencies": {
|
|
12
20
|
"tsup": "^8.0.0",
|
|
@@ -35,6 +43,7 @@
|
|
|
35
43
|
"scripts": {
|
|
36
44
|
"build": "tsup",
|
|
37
45
|
"dev": "tsup --watch",
|
|
38
|
-
"clean": "rm -rf dist"
|
|
46
|
+
"clean": "rm -rf dist",
|
|
47
|
+
"typecheck": "tsc --noEmit"
|
|
39
48
|
}
|
|
40
49
|
}
|