(data: Mapping[str, Any])
| 118 | |
| 119 | |
| 120 | def _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 | |
| 129 | def _build_llm(raw: Mapping[str, Any]) -> LLMConfig: |
no test coverage detected