From 59d9a8d8df06a68f3e13f5f4ef6b86ad4d31459f Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 26 Aug 2024 15:25:58 +0000 Subject: [PATCH] add links to genaiscript integration --- docs/sdks/genaiscript.mdx | 31 +++++++++++++++++++++++ examples/genaiscript/calculator.genai.mts | 4 +++ readme.md | 4 +++ 3 files changed, 39 insertions(+) create mode 100644 docs/sdks/genaiscript.mdx create mode 100644 examples/genaiscript/calculator.genai.mts diff --git a/docs/sdks/genaiscript.mdx b/docs/sdks/genaiscript.mdx new file mode 100644 index 0000000..990b12c --- /dev/null +++ b/docs/sdks/genaiscript.mdx @@ -0,0 +1,31 @@ +--- +title: GenAIScript +description: Agentic support in GenAIScript. +--- + +- package: none necessary +- [GenAIScript Agentic docs](https://microsoft.github.io/genaiscript/getting-started/agentic-tools) + +## Usage + +```ts +import { calculator } from '@agentic/calculator' +defTool(calculator) + +$`Answer the following arithmetic question: How much is 11 + 4? then divide by 3?` +``` + +## Running this example + + + You'll need an [OpenAI API key](https://platform.openai.com/docs/quickstart) + to run this example. Store it in a local `.env` file as `OPENAI_API_KEY`. + + +```sh +git clone git@github.com:transitive-bullshit/agentic.git +cd agentic +pnpm install +echo 'OPENAI_API_KEY=your-key' >> .env +npx genaiscript examples/genaiscript/calculator.genai.mts +``` diff --git a/examples/genaiscript/calculator.genai.mts b/examples/genaiscript/calculator.genai.mts new file mode 100644 index 0000000..decd29b --- /dev/null +++ b/examples/genaiscript/calculator.genai.mts @@ -0,0 +1,4 @@ +import { calculator } from '@agentic/calculator' +defTool(calculator) + +$`Answer the following arithmetic question: How much is 11 + 4? then divide by 3?` diff --git a/readme.md b/readme.md index 9830623..d698058 100644 --- a/readme.md +++ b/readme.md @@ -139,6 +139,10 @@ Full docs are available at [agentic.so](https://agentic.so). [Agentic adapter docs for OpenAI](https://agentic.so/sdks/openai) +### GenAIScript + +[Agentic support in GenAIScript](https://agentic.so/sdks/genaiscript) + ## Tools | Service / Tool | Package | Docs | Description |