Documentation
¶
Overview ¶
Package adapter bridges Aura's LLM types with Fantasy's unified provider abstraction. It converts requests, messages, tools, and streaming responses between the two systems.
Index ¶
- func MapError(err error) error
- func SetGeneration(c *fantasy.Call, gen *generation.Generation)
- func StreamToMessage(streamIter func(func(fantasy.StreamPart) bool), fn stream.Func, ...) (message.Message, usage.Usage, error)
- func ToCall(msgs message.Messages, tools tool.Schemas) fantasy.Call
- func ToMessage(msg message.Message) fantasy.Message
- func ToTools(schemas tool.Schemas) []fantasy.Tool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetGeneration ¶
func SetGeneration(c *fantasy.Call, gen *generation.Generation)
SetGeneration maps Aura's generation parameters onto a Fantasy Call.
func StreamToMessage ¶
func StreamToMessage(streamIter func(func(fantasy.StreamPart) bool), fn stream.Func, providerHint string) (message.Message, usage.Usage, error)
StreamToMessage consumes a Fantasy stream, calls fn for incremental deltas, and returns the accumulated Aura message + usage. providerHint identifies the provider for ThinkingSignature extraction (e.g., "anthropic", "google").
func ToCall ¶
ToCall converts Aura messages and tool schemas to a Fantasy Call. System messages are converted to Fantasy system messages within the Prompt. Provider-specific options (thinking, reasoning, store) are NOT set here — each provider adds them via Call.ProviderOptions after calling ToCall.
Types ¶
This section is empty.