Skip to content

Commit

Permalink
docs: fix missing async in readme code sample (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Jan 15, 2024
1 parent 3721927 commit 553fb37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -304,8 +304,8 @@ import { fetch } from 'undici'; // as one example
import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({
fetch: (url: RequestInfo, init?: RequestInfo): Response => {
console.log('About to make request', url, init);
fetch: async (url: RequestInfo, init?: RequestInfo): Promise<Response> => {
console.log('About to make a request', url, init);
const response = await fetch(url, init);
console.log('Got response', response);
return response;
Expand Down

0 comments on commit 553fb37

Please sign in to comment.