FormulaMonks / kurt

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

refactor: Simplify the internal implementation of KurtResult. #6

Closed jemc closed 2 months ago

jemc commented 2 months ago

The implementation of KurtResult was handling two different kinds of listeners: full stream listeners and final event listeners.

This commit removes a bunch of internal fields related to tracking state for final event listeners, unifying it with the mechanism for full stream listeners, using a simple function to convert a full stream listener to a final event listener.