Skip to content

Commit

Permalink
Merge pull request #664 from pelikhan/genaiscript
Browse files Browse the repository at this point in the history
  • Loading branch information
transitive-bullshit authored Aug 26, 2024
2 parents c64069c + 25e6522 commit cde5db9
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"sdks/llamaindex",
"sdks/genkit",
"sdks/dexter",
"sdks/openai"
"sdks/openai",
"sdks/genaiscript"
]
},
{
Expand Down
31 changes: 31 additions & 0 deletions docs/sdks/genaiscript.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: GenAIScript
description: Builtin agentic tool support in GenAIScript.
---

- package: none necessary
- [GenAIScript docs](https://microsoft.github.io/genaiscript/guides/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

<Info>
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`.
</Info>

```sh
git clone [email protected]:transitive-bullshit/agentic.git
cd agentic
pnpm install
echo 'OPENAI_API_KEY=your-key' >> .env
npx genaiscript examples/genaiscript/calculator.genai.mts
```
4 changes: 4 additions & 0 deletions examples/genaiscript/calculator.genai.mts
Original file line number Diff line number Diff line change
@@ -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?`
4 changes: 4 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down

0 comments on commit cde5db9

Please sign in to comment.