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: Properly deal with parallel tool calls. #33

Closed jemc closed 1 month ago

jemc commented 1 month ago

Sometimes the underlying LLM tries todo multiple tool calls in parallel instead of just one. Sometimes this breaks the underlying assumptions in the adapter code.

We likely need to do two things to close this ticket:

Alternatively we could try to make the parallel case work with the existing type signatures by adding an optional field in the final event which will hold every additional tool call after the first one. This is a bit weirder of a type signature, but it has some advantages: