From 6713fd7b09836bceb05c05d75e43d59eee965163 Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Sun, 14 Jan 2024 22:38:45 -0500 Subject: [PATCH] docs: fix missing async in readme code sample (#255) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a08640b..3ff6091 100644 --- a/README.md +++ b/README.md @@ -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 => { + console.log('About to make a request', url, init); const response = await fetch(url, init); console.log('Got response', response); return response;