@@ -87,7 +87,7 @@ test("streaming", async () => {
8787test ( "invoke with bound tools" , async ( ) => {
8888 const chat = new ChatGroq ( {
8989 maxRetries : 0 ,
90- model : "llama-3.3-70b-versatile " ,
90+ model : "moonshotai/kimi-k2-instruct " ,
9191 } ) ;
9292 const message = new HumanMessage ( "What is the current weather in Hawaii?" ) ;
9393 const res = await chat
@@ -168,7 +168,7 @@ test("stream with bound tools, yielding a single chunk", async () => {
168168
169169test ( "Few shotting with tool calls" , async ( ) => {
170170 const chat = new ChatGroq ( {
171- model : "llama-3.3-70b-versatile " ,
171+ model : "moonshotai/kimi-k2-instruct " ,
172172 temperature : 0 ,
173173 } ) . bindTools (
174174 [
@@ -222,7 +222,7 @@ test("Few shotting with tool calls", async () => {
222222
223223test ( "Groq can stream tool calls" , async ( ) => {
224224 const model = new ChatGroq ( {
225- model : "llama-3.1 -70b-versatile" ,
225+ model : "llama-3.3 -70b-versatile" ,
226226 temperature : 0 ,
227227 } ) ;
228228
@@ -281,3 +281,32 @@ test("response metadata includes groq metadata when streaming", async () => {
281281 // console.dir(finalRes, { depth: Infinity });
282282 expect ( finalRes ?. response_metadata . x_groq ?. id ) . toBeDefined ( ) ;
283283} ) ;
284+
285+ test ( "invoke with image input" , async ( ) => {
286+ const chat = new ChatGroq ( {
287+ maxRetries : 0 ,
288+ model : "meta-llama/llama-4-scout-17b-16e-instruct" ,
289+ } ) ;
290+ const message = new HumanMessage ( {
291+ content : [
292+ {
293+ type : "text" ,
294+ text : "What's in this image?" ,
295+ } ,
296+ {
297+ type : "image_url" ,
298+ image_url : {
299+ url : "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" ,
300+ } ,
301+ } ,
302+ ] ,
303+ } ) ;
304+ const res = await chat . invoke ( [ message ] ) ;
305+
306+ expect ( res . content . length ) . toBeGreaterThan ( 10 ) ;
307+ expect ( typeof res . content ) . toBe ( "string" ) ;
308+ // The response should contain some reference to Google or logo
309+ expect ( ( res . content as string ) . toLowerCase ( ) ) . toMatch (
310+ / g o o g l e | l o g o | t e x t | i m a g e /
311+ ) ;
312+ } ) ;
0 commit comments