LemonAi.Providers.AssistantMessageHelper (lemon_ai v0.1.0)

View Source

Shared helper for building the initial %AssistantMessage{} used by all streaming providers.

Summary

Functions

Build a zeroed-out AssistantMessage for the start of a streaming response.

Functions

init_assistant_message(model, opts \\ [])

Build a zeroed-out AssistantMessage for the start of a streaming response.

By default, api is taken from model.api. Pass api_override to hardcode a provider-specific API atom instead.

Similarly, provider is taken from model.provider. Pass provider_override to supply a fallback (e.g. model.provider || :amazon).