Skip to content

Commit

Permalink
Merge pull request #629 from Just-Moh-it/patch-1
Browse files Browse the repository at this point in the history
Docs: buggy code example
  • Loading branch information
athyuttamre authored Jan 14, 2024
2 parents d67c11b + 0cfb8a0 commit 89cea27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,8 @@ import { fetch } from 'undici'; // as one example
import OpenAI from 'openai';

const client = new OpenAI({
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 89cea27

Please sign in to comment.