Skip to content

Commit 89cea27

Browse files
authored
Merge pull request #629 from Just-Moh-it/patch-1
Docs: buggy code example
2 parents d67c11b + 0cfb8a0 commit 89cea27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,8 @@ import { fetch } from 'undici'; // as one example
434434
import OpenAI from 'openai';
435435

436436
const client = new OpenAI({
437-
fetch: (url: RequestInfo, init?: RequestInfo): Response => {
438-
console.log('About to make request', url, init);
437+
fetch: async (url: RequestInfo, init?: RequestInfo): Promise<Response> => {
438+
console.log('About to make a request', url, init);
439439
const response = await fetch(url, init);
440440
console.log('Got response', response);
441441
return response;

0 commit comments

Comments
 (0)