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

Method get_provider

config/schema.py:31–37  ·  view source on GitHub ↗
(self, provider_name: str)

Source from the content-addressed store, hash-verified

29 providers: dict[str, LLMProviderConfig] = field(default_factory=dict)
30
31 def get_provider(self, provider_name: str) -> LLMProviderConfig:
32 source = self.providers.get(provider_name, LLMProviderConfig())
33 return LLMProviderConfig(
34 api_base=source.api_base,
35 api_key=source.api_key,
36 temperature=self.temperature if source.temperature is None else source.temperature,
37 )
38
39 def as_legacy_provider_config(self) -> ModelProviderConfig:
40 openai = self.get_provider("openai")

Callers 3

handle_doctorFunction · 0.80
build_provider_payloadFunction · 0.80

Calls 1

LLMProviderConfigClass · 0.85

Tested by

no test coverage detected