GenAI.Provider.Ollama.EncoderProtocol protocol (Noizu Labs, GenAI Wrapper v0.3.0)

Copy Markdown

Encoders use their module's EncoderProtocol to prep messages and tool definitions To make future extensibility for third parties straight forward. If a new message type, or tool type is added one simply needs to implement a EncoderProtocol for it and most cases you can simply cast it to generic known type and then invoke the protocol again.

Ollama uses a similar format to OpenAI but with some differences.

Summary

Types

t()

All the types that implement this protocol.

Types

t()

@type t() :: term()

All the types that implement this protocol.

Functions

encode(subject, model, session, context, options)