nat.plugins.adk.llm#
Attributes#
Functions#
|
Create and yield a Google ADK |
|
|
|
Create and yield a Google ADK |
|
Create and yield a Google ADK |
|
Create and yield a Google ADK LiteLlm client for Dynamo with prefix header support. |
Module Contents#
- logger#
- async azure_openai_adk(
- config: nat.llm.azure_openai_llm.AzureOpenAIModelConfig,
- _builder: nat.builder.builder.Builder,
Create and yield a Google ADK
AzureOpenAIclient from a NATAzureOpenAIModelConfig.- Args:
config (AzureOpenAIModelConfig): The configuration for the AzureOpenAI model. _builder (Builder): The NAT builder instance.
- async litellm_adk(
- litellm_config: nat.llm.litellm_llm.LiteLlmModelConfig,
- _builder: nat.builder.builder.Builder,
- async nim_adk(
- config: nat.llm.nim_llm.NIMModelConfig,
- _builder: nat.builder.builder.Builder,
Create and yield a Google ADK
NIMclient from a NATNIMModelConfig.- Args:
config (NIMModelConfig): The configuration for the NIM model. _builder (Builder): The NAT builder instance.
- async openai_adk(
- config: nat.llm.openai_llm.OpenAIModelConfig,
- _builder: nat.builder.builder.Builder,
Create and yield a Google ADK
OpenAIclient from a NATOpenAIModelConfig.- Args:
config (OpenAIModelConfig): The configuration for the OpenAI model. _builder (Builder): The NAT builder instance.
- async dynamo_adk(
- config: nat.llm.dynamo_llm.DynamoModelConfig,
- _builder: nat.builder.builder.Builder,
Create and yield a Google ADK LiteLlm client for Dynamo with prefix header support.
This client configures Dynamo routing hints via LiteLLM’s extra_headers parameter. Unlike the LangChain implementation which injects headers per-request via httpx hooks, LiteLLM sets headers at initialization time.
For dynamic prefix IDs (e.g., per-evaluation-question), use the DynamoPrefixContext class:
from nat.llm.dynamo_llm import DynamoPrefixContext DynamoPrefixContext.set("my-prefix-id") # ... run LLM calls ... DynamoPrefixContext.clear() # Or use the context manager: with DynamoPrefixContext.scope("my-prefix-id"): # ... run LLM calls ...
Note: The context variable approach requires custom integration as LiteLLM’s headers are static. For full dynamic prefix ID support, consider using the LangChain client.
- Args:
config (DynamoModelConfig): The configuration for the Dynamo model. _builder (Builder): The NAT builder instance.