groq / groq-typescript

The official Node.js / Typescript library for the Groq API
Apache License 2.0
145 stars 17 forks source link

Update chat_completions_ext.ts to fix the error in #19 #22

Closed gamer-mitsuha closed 4 months ago

gamer-mitsuha commented 4 months ago

Particularly, this fixes the error in #19

node_modules/groq-sdk/lib/chat_completions_ext.d.ts:1:32 - error TS2307: Cannot find module 'groq-sdk/resources/chat' or its corresponding type declarations.

1 import { ChatCompletion } from 'groq-sdk/resources/chat';
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~

FYI, I found the fix by checking another file (streaming.d.ts) in the same directory, which does not trigger the TS compilation error. (It uses import { ReadableStream, type Response } from 'groq-sdk/_shims/index';, note the final index.)

Tested this in my local repo, TS compilation succeeded after applying the change.

gradenr commented 4 months ago

Thanks so much for the fix. Can you please add the prefix fix: to your commit message to follow the conventional commits format.

Example: fix: update import in chat_completions_ext.ts to address TS compilation error

gamer-mitsuha commented 4 months ago

Thanks so much for the fix. Can you please add the prefix fix: to your commit message to follow the conventional commits format.

Example: fix: update import in chat_completions_ext.ts to address TS compilation error

Thanks for the review! Updated the commit message. PTAL?