summaryrefslogtreecommitdiff
path: root/rag/generator/__init__.py
blob: 7da603cae85ba517eafad7dc3ab0a2f708ce7ac7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from typing import Type

from .abstract import AbstractGenerator
from .ollama import Ollama
from .cohere import Cohere


def get_generator(model: str) -> Type[AbstractGenerator]:
    match model:
        case "ollama":
            return Ollama()
        case "cohere":
            return Cohere()
        case _:
            exit(1)