MCPcopy Create free account
hub / github.com/Dizzy-K/AutoPT / _build_llm_provider

Function _build_llm_provider

config/loader.py:120–126  ·  view source on GitHub ↗
(data: Mapping[str, Any])

Source from the content-addressed store, hash-verified

118
119
120def _build_llm_provider(data: Mapping[str, Any]) -> LLMProviderConfig:
121 temperature = data.get("temperature")
122 return LLMProviderConfig(
123 api_base=str(data.get("api_base", data.get("openai_base", ""))),
124 api_key=str(data.get("api_key", data.get("openai_key", ""))),
125 temperature=float(temperature) if temperature not in (None, "") else None,
126 )
127
128
129def _build_llm(raw: Mapping[str, Any]) -> LLMConfig:

Callers 1

_build_llmFunction · 0.85

Calls 1

LLMProviderConfigClass · 0.85

Tested by

no test coverage detected