Repository navigation
Expand file tree
/
Copy pathstructure.py
More file actions
88 lines (76 loc) · 1.83 KB
/
Copy pathstructure.py
File metadata and controls
88 lines (76 loc) · 1.83 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
from enum import Enum
from dataclasses import dataclass
class ServiceProvider(Enum):
OpenAI = 1
AzureOpenAI = 2
AWS = 3,
Google = 4,
class ModelVersion(Enum):
gpt4t0125 = 1
gpt4t1106 = 2
gpt40613 = 3
textembeddings3large = 4
textembeddings3small = 5
gpt35t0613 = 6
gpt4o0513 = 7
gpt4t0409 = 8
claude3sonnet20240229v1 = 9
claude3haiku20240307v1 = 10
claude3opus20240229v1 = 11
claude35sonnet20240620v1 = 12
gemini15flash = 13
gemini15pro = 14
gpt4omini0718 = 15
@staticmethod
def as_list():
return [e.name for e in ModelVersion]
@staticmethod
def as_list_from_str(input:str):
list_str = str.split(input,',')
return [ModelVersion[item] for item in list_str]
@staticmethod
def embeddings_list():
return [ModelVersion.textembeddings3large, ModelVersion.textembeddings3small]
@staticmethod
def vision_list():
return [ModelVersion.gpt4o0513, ModelVersion.gpt4omini0718]
class Region(Enum):
Global = 1
EastUS = 2
NorthCentralUS = 3
SouthCentralUS = 4
WestUS = 5
SwedenCentral = 6
UKSouth = 7
FranceCentral = 8
AustraliaEast = 9
JapanEast = 10
SouthIndia = 11
EastUS2 = 12
@staticmethod
def as_list():
return [e.name for e in Region]
@dataclass
class RequestInput:
model_version:ModelVersion
Prompt:str
max_token:int
stream:bool
expected_samples:str
image_url:str
@dataclass
class ResponseOutput:
samples: str
time_to_first_token:float
time_between_tokens: list[float]
mean_time_between_tokens:float
time_to_last_token: float
finish_reason:str
n_prompts:int
n_gen:int
edit_distance:int
class Environment(Enum):
Dev = 1
Cloud = 2
def as_list():
return [e.name for e in Environment]