diff --git a/.changeset/rude-mice-add.md b/.changeset/rude-mice-add.md deleted file mode 100644 index b30ac84..0000000 --- a/.changeset/rude-mice-add.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -'@statelyai/agent': patch ---- - -Add `adapter.fromTool(…)`, which creates an actor that chooses agent logic based on a input. - -```ts -const actor = adapter.fromTool(() => 'Draw me a picture of a donut', { - // tools - makeIllustration: { - description: 'Makes an illustration', - run: async (input) => { - /* ... */ - }, - inputSchema: { - /* ... */ - }, - }, - getWeather: { - description: 'Gets the weather', - run: async (input) => { - /* ... */ - }, - inputSchema: { - /* ... */ - }, - }, -}); - -//... -``` diff --git a/CHANGELOG.md b/CHANGELOG.md index 75b6a4c..c380c40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,37 @@ # @statelyai/agent +## 0.0.5 + +### Patch Changes + +- [#9](https://github.com/statelyai/agent/pull/9) [`d8e7b67`](https://github.com/statelyai/agent/commit/d8e7b673f6d265f37b2096b25d75310845860271) Thanks [@davidkpiano](https://github.com/davidkpiano)! - Add `adapter.fromTool(…)`, which creates an actor that chooses agent logic based on a input. + + ```ts + const actor = adapter.fromTool(() => "Draw me a picture of a donut", { + // tools + makeIllustration: { + description: "Makes an illustration", + run: async (input) => { + /* ... */ + }, + inputSchema: { + /* ... */ + }, + }, + getWeather: { + description: "Gets the weather", + run: async (input) => { + /* ... */ + }, + inputSchema: { + /* ... */ + }, + }, + }); + + //... + ``` + ## 0.0.4 ### Patch Changes diff --git a/package.json b/package.json index 2c981b2..bec0633 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@statelyai/agent", - "version": "0.0.4", + "version": "0.0.5", "description": "", "main": "dist/index.js", "module": "dist/index.mjs",