# Setup

```
cd aiconfig/cookbooks/Function-Calling-OpenAI/typescript && yarn
```

Set OPENAI_API_KEY environment variable (bash/zsh) by running the following command in the terminal:

```
export OPENAI_API_KEY=<my-openai-key>
```

You can get your key from https://platform.openai.com/api-keys

# Run

Run the script from `aiconfig/cookbooks/Function-Calling-OpenAI/typescript` directory:

```
npx ts-node function-calling-with-openai.ts
```
