Documentation
¶
Overview ¶
Package common holds helpers shared by the genai LLM adapters so wire-format rules are implemented once.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalToolPayload ¶
func MarshalToolPayload(payload any) (json.RawMessage, error)
MarshalToolPayload encodes a tool-call args or tool-response map for the wire. nil/empty become "{}", never "null": strict OpenAI-compatible parsers (Qwen on vLLM/llama.cpp) reject "null" where they expect an object. An already-encoded json.RawMessage passes through. The input is never mutated.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.