MCPcopy Index your code
hub / github.com/FSoft-AI4Code/CodeWiki / get_backend

Function get_backend

codewiki/src/be/backend.py:60–67  ·  view source on GitHub ↗

Return the backend instance matching ``config.provider``.

(config)

Source from the content-addressed store, hash-verified

58
59
60def get_backend(config) -> "LLMBackend":
61 """Return the backend instance matching ``config.provider``."""
62 provider = getattr(config, "provider", "openai-compatible")
63 if is_caw_provider(provider):
64 from codewiki.src.be.caw_backend import CawBackend
65 return CawBackend(config)
66 from codewiki.src.be.pydantic_ai_backend import PydanticAIBackend
67 return PydanticAIBackend(config)

Callers 1

__init__Method · 0.90

Calls 3

CawBackendClass · 0.90
PydanticAIBackendClass · 0.90
is_caw_providerFunction · 0.85

Tested by

no test coverage detected