FormulaMonks / kurt

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

feat: add optional `additionalData` field to `KurtResult` (final stream event). #34

Closed jemc closed 1 month ago

jemc commented 1 month ago

This is the first step to solving for parallel tool calls (see issue #33).

This commit adds a new optional field to KurtResult called additionalData which can hold an array of additional structured data entries, of the same type D that is used for the mandatory data field.

This solution has a few nice properties:

You could argue that it would be "nicer" to have all the tool entries in one array, but I think the above benefits are reason enough to prefer this design.

Note that after this commit is merged, the next step is to update the adapters to start handling the multi-value case, making use of this new field. That work will actually be what is needed to fully resolve the #33 ticket.

github-actions[bot] commented 1 month ago

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

The release is available on:

Your semantic-release bot :package::rocket: