R1ck404 commited on
Commit
b9bbb2d
·
verified ·
1 Parent(s): af0a7d8

Show how to use Relay from npm

Browse files

The card now says npm install @sealresearch/relay.

Files changed (1) hide show
  1. README.md +3 -3
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 a browser or in Node, build `relay.wasm` with `./build.sh wasm` and use `models/relay/web/relay-native.mjs`; the
113
- repository README has a short example. The native and WebAssembly builds return the same calls, byte for byte, for any
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.