Initialize and return configured LLM and Embedder instances.
()
| 23 | |
| 24 | |
| 25 | def build_llm_and_embedder() -> tuple[Any, Any]: |
| 26 | """Initialize and return configured LLM and Embedder instances.""" |
| 27 | llm_config_dict = get_llm_config() |
| 28 | embedder_config_dict = get_embedder_config() |
| 29 | |
| 30 | llm_config = LLMConfigFactory.model_validate(llm_config_dict) |
| 31 | embedder_config = EmbedderConfigFactory.model_validate(embedder_config_dict) |
| 32 | |
| 33 | llm = LLMFactory.from_config(llm_config) |
| 34 | embedder = EmbedderFactory.from_config(embedder_config) |
| 35 | |
| 36 | return embedder, llm |
| 37 | |
| 38 | |
| 39 | def build_file_parser() -> Any: |
no test coverage detected