File size: 749 Bytes
63ae4a0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
"""Stand-in for decision_index.engines.base when the Decision Index kit is not installed (the engines use the kit's classes when it is)."""


class Unsupported(ValueError):
    pass


class Engine:
    name = "engine"
    provenance = {}
    latency = "In-process request wall time including prompt construction; excludes model loading."

    def __init__(self, **options):
        self.options = options

    def __call__(self, state, questions):
        raise NotImplementedError

    def warmup(self):
        warm = {"warmup": {"type": "choice", "instructions": "Which color is named?", "criteria": {"red": "red", "blue": "blue"}}}
        for _ in range(2):
            self("The color is red.", warm)

    def runtime(self):
        return {}