FormulaMonks / kurt

A wrapper for AI SDKs, for building LLM-agnostic structured AI applications in Typescript
MIT License
2 stars 0 forks source link

fix: account for changes in VertexAI chunking behavior #30

Closed jemc closed 1 month ago

jemc commented 1 month ago

VertexAI has quietly changed the behavior of how the "final" event in a stream is represented. Previously, VertexAI would mark the stop reason on the same event as the final chunk of text or function call. Now VertexAI is sending a separate stop event with empty text, which was breaking our mechanism for handling tool calls.

This PR updates the tests and our event handling logic to account for this change in behavior.

github-actions[bot] commented 1 month ago

:tada: This PR is included in version @formula-monks/kurt-vertex-ai-v1.1.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: