You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a workflow ends with an LLM call, the workflow will stream that LLM
call.
In other words, when you call a function whose final expression is a
single LLM call, the result can be streamed. But if the final expression
is something other than an LLM call, like a list or a class constructor,
the result will be delivered in one shot.
<!-- ELLIPSIS_HIDDEN -->
----
> [!IMPORTANT]
> This PR enables streaming for workflows ending with an LLM call by
evaluating if the final expression is a single LLM call, with updates to
type inference, expression evaluation, and runtime execution.
>
> - **Behavior**:
> - Workflows ending with an LLM call now support streaming if the final
expression is a single LLM call.
> - Non-LLM final expressions (e.g., lists, class constructors) are
delivered in one shot.
> - **Type Inference**:
> - Updates to `infer_types_in_context()` in `expr_typecheck.rs` to
handle new expression types.
> - Introduces `initial_typing_context()` in `repr.rs` for better type
inference.
> - **Expression Evaluation**:
> - Adds `eval_to_value_or_llm_call()` in `eval_expr.rs` to evaluate
expressions to either a value or an LLM call.
> - Modifies `beta_reduce()` in `eval_expr.rs` to support LLM function
evaluation.
> - **Runtime Execution**:
> - Updates `BamlRuntime` in `lib.rs` to handle expression functions and
determine if they result in an LLM call.
> - Introduces `expr_eval_result()` in `lib.rs` to evaluate expression
functions and determine streaming capability.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=BoundaryML%2Fbaml&utm_source=github&utm_medium=referral)<sup>
for 002d33f. You can
[customize](https://app.ellipsis.dev/BoundaryML/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>
<!-- ELLIPSIS_HIDDEN -->
0 commit comments