datarobot_genai.langgraph.llm
llm
get_router_llm
get_router_llm(primary: LLMConfig, fallbacks: list[LLMConfig], router_settings: dict | None = None) -> BaseChatModel
Return a ChatLiteLLMRouter backed by a litellm.Router.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
primary
|
LLMConfig
|
|
required |
fallbacks
|
list[LLMConfig]
|
Ordered list of |
required |
router_settings
|
dict | None
|
Extra kwargs forwarded to |
None
|
Source code in datarobot_genai/langgraph/llm.py
get_llm
get_llm(model_name: str | None = None, parameters: dict | None = None, streaming: bool = True, reasoning: bool = False, config: LLMConfig | None = None) -> BaseChatModel
Build the framework LLM for a given (or the default) LLM config.
Pass config (for example resolve_config().resolve_llm_config(name="bob"))
to build a specific configured LLM instance; omit it to build the app's default LLM.