File size: 529 Bytes
aa37f44
 
48e003d
aa37f44
 
 
 
 
 
 
 
48e003d
 
aa37f44
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from climateqa.engine.llm.openai import get_llm as get_openai_llm
from climateqa.engine.llm.azure import get_llm as get_azure_llm
from climateqa.engine.llm.ollama import get_llm as get_ollama_llm


def get_llm(provider="openai",**kwargs):

    if provider == "openai":
        return get_openai_llm(**kwargs)
    elif provider == "azure":
        return get_azure_llm(**kwargs)
    elif provider == "ollama":
        return  get_ollama_llm(**kwargs)
    else:
        raise ValueError(f"Unknown provider: {provider}")