Show how to use Relay from npm
Browse filesThe card now says npm install @sealresearch/relay.
README.md
CHANGED
|
@@ -109,9 +109,9 @@ out/relay-x64.exe ../relay-model --record '{
|
|
| 109 |
# [{"tool": "show_map", "args": {"query": "Eiffel Tower"}}]
|
| 110 |
```
|
| 111 |
|
| 112 |
-
In
|
| 113 |
-
|
| 114 |
-
thread count.
|
| 115 |
|
| 116 |
An app gives Relay a record: `{text, tools: [{name, description, params: [...]}], kind?, context?: {now}}`. Relay returns
|
| 117 |
`[{tool, args}]`, or `[]` when no tool fits.
|
|
|
|
| 109 |
# [{"tool": "show_map", "args": {"query": "Eiffel Tower"}}]
|
| 110 |
```
|
| 111 |
|
| 112 |
+
In Node or a browser, run `npm install @sealresearch/relay` and call `Relay.load()`, which downloads and checks these files for you
|
| 113 |
+
([package](https://github.com/sealresearch/gust/tree/main/packages/relay)). To build the WebAssembly runtime yourself, run `./build.sh wasm`
|
| 114 |
+
and use `models/relay/web/relay-native.mjs`. The native and WebAssembly builds return the same calls, byte for byte, for any thread count.
|
| 115 |
|
| 116 |
An app gives Relay a record: `{text, tools: [{name, description, params: [...]}], kind?, context?: {now}}`. Relay returns
|
| 117 |
`[{tool, args}]`, or `[]` when no tool fits.
|