ahmadrosid / llm-tool-call

Example to use LLM tool call using openai and anthropic.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

llm-tool-call

Example how to use tool call with OpenAI and Anthropic.

Install Dependency

This project is created using bun you can install the package using npm or bun package manager.

Install package using npm.

npm run install

Install package using bun.

bun install

Run the project

The example project is using firecrawl, so please grab your Firecrawl apikey here.

Copy example env variable.

cp .env.example .env

Please update the value:

OPENAI_API_KEY=sk-...
FIRE_CRAWL_API_KEY=fc-...
ANTHROPIC_API_KEY=sk-...

Then run the script using javascript.

Run openai example.

node run index.js

Run anthropic example.

node run anthropic.js

Reference

Anthropic:

OpenAI:

About

Example to use LLM tool call using openai and anthropic.


Languages

Language:JavaScript 100.0%