@@ -44,9 +44,7 @@ def __init__(self, llm: LLM, access_token: str):
44
44
def _get_message (self , message : str , role : str = "user" ):
45
45
return {"role" : role , "content" : message }
46
46
47
- def _handle_api_response (
48
- self , response
49
- ) -> Union [Dict [str , str ], Dict [str , Union [str , int ]]]:
47
+ def _handle_api_response (self , response ) -> Dict [str , Union [str , int ]]:
50
48
"""
51
49
Handles the API response, returning a success or error structure that the frontend can use.
52
50
"""
@@ -101,7 +99,7 @@ def _fireworks_ai_fetch_completions(self, messages: List[Dict[str, str]]):
101
99
102
100
def _fetch_completion (
103
101
self , messages : List [Dict [str , str ]]
104
- ) -> Union [ Dict [str , str ], Dict [ str , Union [str , int ] ]]:
102
+ ) -> Dict [str , Union [str , int ]]:
105
103
"""
106
104
Fetches the completion using the appropriate AI provider based on the LLM.
107
105
"""
@@ -118,7 +116,7 @@ def _fetch_completion(
118
116
119
117
def get_dora_metrics_score (
120
118
self , four_keys_data : Dict [str , float ]
121
- ) -> Union [ Dict [str , str ], Dict [ str , Union [str , int ] ]]:
119
+ ) -> Dict [str , Union [str , int ]]:
122
120
"""
123
121
Calculate the DORA metrics score using input data and an LLM (Language Learning Model).
124
122
0 commit comments