Documentation
¶
Overview ¶
Package adkv2 adapts core-models to the ADK major its import path names. mast and core-agent are both on ADK v2, and this is the only adapter module; a future ADK major gets its own module beside it.
Every conversion is a field copy: llm.Request and llm.Response mirror ADK's types, and this module's tests fail the day ADK adds a field the mirror lacks. Pointers and maps are shared, not cloned, exactly as passing the ADK value through would share them.
Index ¶
- func ADKRequest(r *llm.Request) *model.LLMRequest
- func ADKResponse(r *llm.Response) *model.LLMResponse
- func FromADK(m model.LLM) llm.LLM
- func GroundingProjection(inner session.Service) session.Service
- func Request(r *model.LLMRequest) *llm.Request
- func Response(r *model.LLMResponse) *llm.Response
- func Wrap(m llm.LLM) model.LLM
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ADKRequest ¶
func ADKRequest(r *llm.Request) *model.LLMRequest
ADKRequest converts a core-models request. Tools is left nil.
func ADKResponse ¶
func ADKResponse(r *llm.Response) *model.LLMResponse
ADKResponse converts a core-models response.
func FromADK ¶
FromADK adapts an ADK model.LLM to llm.LLM, so a decorator written against core-models can sit in front of a model ADK built. Unwrapping the result of Wrap hands back the original.
func GroundingProjection ¶ added in v0.7.0
GroundingProjection wraps a session.Service so that every event carrying Gemini Google Search grounding is followed by synthetic events surfacing that evidence: one per search query the model issued, then one per grounded web source, each authored gemini.AuthorGoogleSearch. The lines come from gemini.GroundingEvidence, the ADK-free half of this projection.
The synthetic events share the parent's InvocationID and Branch, so event-log queries by invocation, author or branch find them. Their Content.Role is empty, so ADK's content processor leaves them out of the conversation it sends the model: they are for audit and display, not context.
Wrap the service before handing it to the runner:
svc = adkv2.GroundingProjection(svc)
func Request ¶
func Request(r *model.LLMRequest) *llm.Request
Request converts an ADK request. Its Tools map has no counterpart and is dropped: it holds ADK tool objects for ADK's own dispatch, and the declarations a provider sends are in Config.Tools.
Types ¶
This section is empty.