MCPcopy Create free account
hub / github.com/ResearAI/AutoFigure / create_client_from_config

Function create_client_from_config

autofigure/utils/llm_client.py:183–207  ·  view source on GitHub ↗

Create an LLM client from SDK config. Args: config: AutoFigure SDK Config object purpose: 'generation' or 'methodology' Returns: Configured LLMClient instance

(config: "Config", purpose: str = "generation")

Source from the content-addressed store, hash-verified

181
182
183def create_client_from_config(config: "Config", purpose: str = "generation") -> LLMClient:
184 """
185 Create an LLM client from SDK config.
186
187 Args:
188 config: AutoFigure SDK Config object
189 purpose: 'generation' or 'methodology'
190
191 Returns:
192 Configured LLMClient instance
193 """
194 if purpose == "methodology":
195 return LLMClient(
196 api_key=config.methodology_api_key,
197 base_url=config.methodology_base_url,
198 model=config.methodology_model,
199 provider=config.methodology_provider,
200 )
201 else:
202 return LLMClient(
203 api_key=config.generation_api_key,
204 base_url=config.generation_base_url,
205 model=config.generation_model,
206 provider=config.generation_provider,
207 )

Callers 1

llm_clientMethod · 0.85

Calls 1

LLMClientClass · 0.85

Tested by

no test coverage detected