ailoy-web
    Preparing search index...

    Type Alias PartDeltaFunction

    PartDeltaFunction:
        | { text: string; type: "verbatim" }
        | { arguments: string; name: string; type: "with_string_args" }
        | { arguments: Value; name: string; type: "with_parsed_args" }

    Represents an incremental update (delta) of a function part.

    This type is used during streaming or partial message generation, when function calls are being streamed as text chunks or partial JSON fragments.

    Variants

    • Verbatim(String) — Raw text content, typically a partial JSON fragment.
    • WithStringArgs { name, arguments } — Function name and its serialized arguments as strings.
    • WithParsedArgs { name, arguments } — Function name and parsed arguments as a Value.

    Use Case

    When the model streams out a function call response (e.g., \"function_call\":{\"name\":...}), the incremental deltas can be accumulated until the full function payload is formed.

    Example

    let delta = PartDeltaFunction::WithStringArgs {
    name: \"translate\".into(),
    arguments: r#\"{\"text\":\"hi\"}\"#.into(),
    };