Skip to content

Commit

Permalink
Merge pull request #13 from alvesvaren/dev
Browse files Browse the repository at this point in the history
Update readme
  • Loading branch information
alvesvaren authored Nov 24, 2023
2 parents 10bf766 + d714e42 commit 9e714d7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/chatty-icons-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"zod-to-openai-tool": patch
---

Show better example in readme
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ const { tools, processAssistantActions } = createTools({
getWeather: t
.input(z.object({ city: z.string() }))
.describe("Get the weather in a city")
.run(({ city }) => `The weather in ${city} is sunny`),
.run(async ({ city }) => {
const weatherData = await getWeather(city);
return { weather: weatherData };
}),
});

const assistant = await openai.beta.assistants.create({
Expand Down

0 comments on commit 9e714d7

Please sign in to comment.