langchain-ai / langchain-google

MIT License
74 stars 78 forks source link

vertex: fix test #302

Closed ccurme closed 1 week ago

ccurme commented 2 weeks ago

Test has failed last two days with:

google.api_core.exceptions.InvalidArgument: 400 Please ensure that function response turn comes immediately after a function call turn. And the number of function response parts should be equal to number of function call parts of the function call turn.

There should be one ToolMessage per tool call.

ccurme commented 1 week ago

Just confirming my understanding - this was just a bug in the test because we were passing one of the tool messages twice

Yes, my understanding is that previously we were making tool calls 1, 2, 3 and passing in tool messages 3, 1, 2, 3.