Documentation
¶
Overview ¶
Package adapter holds the host-model injection bridge.
In the Python port this wrapped langchain ChatModel/Embeddings objects. The Go port integrates langchain-golang: hosts inject their ChatModel / Embeddings via WrapChatModel / WrapEmbeddings and assign the results to ModelRouting. Unset fields fall back to Config / heuristic mode.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WrapChatModel ¶
func WrapChatModel(cm language.ChatModel, structuredMethod string) providers.LLMProvider
WrapChatModel adapts a host-owned langchain-golang ChatModel into an LLMProvider suitable for ModelRouting — the Go equivalent of Python's ModelRouting fields accepting langchain BaseChatModel objects directly. structuredMethod mirrors Python's structured_method ("function_calling" | "json_mode" | "json_schema"; "" = provider default).
func WrapEmbeddings ¶
func WrapEmbeddings(e embeddings.Embeddings) storage.EmbeddingProvider
WrapEmbeddings bridges a host-owned langchain-golang Embeddings into ladyM's EmbeddingProvider, mirroring Python's LangChainEmbeddingAdapter. Dim starts at 0 and is probed on the first Embed call (deferred-dim pattern, same as OllamaEmbedding / Python's dim=None).
Types ¶
type ModelRouting ¶
type ModelRouting struct {
Embedding storage.EmbeddingProvider
Consolidate providers.LLMProvider
Proceduralize providers.LLMProvider
AttentionGate providers.LLMProvider
L5MentalModel providers.LLMProvider
L6ForwardIntent providers.LLMProvider
}
ModelRouting injects host-owned models, bypassing LadyM's own config. Unset fields fall back to Config / heuristic. Field names mirror providers.NAMED_OPS.
func (*ModelRouting) Get ¶
func (r *ModelRouting) Get(op string) providers.LLMProvider
Get returns the injected LLM provider for op, or nil.