Skip to content

Commit

Permalink
📓 add doc example usage
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkjrs committed Nov 2, 2023
1 parent ec18c11 commit ad40651
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,24 @@ OPENAI_API_KEY=blahblah
- Add environment variables to your deployment
- Deploy!

#### Usage example

```jsx
<PromoChat
promoData={undefined}
apiRoute="/api/sales"
inputMessagePlaceholder="What is my ad spend today?"
executeRecaptcha={executeRecaptcha}
/>
```

Where `executeRecaptcha` is a function, e.g.

```ts
const executeRecaptcha = (actionName: string) =>
generateRecaptchaTokenString(actionName);
```

### Backend functionality

The backend path given should accept a POST request with a JSON body containing
Expand Down

0 comments on commit ad40651

Please sign in to comment.