File tree 1 file changed +23
-0
lines changed
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,29 @@ def prompts(self) -> "Dataset":
178
178
]
179
179
)
180
180
181
+ def aproximate_job_cost (self ):
182
+ from edsl import Coop
183
+
184
+ c = Coop ()
185
+ price_lookup = c .fetch_prices ()
186
+ # key = (self._inference_service_, self.model)
187
+ # if key not in price_lookup:
188
+ # return f"Could not find price for model {self.model} in the price lookup."
189
+
190
+ # relevant_prices = price_lookup[key]
191
+
192
+ prompts = self .prompts ()
193
+
194
+ text_len = 0
195
+ for prompt in prompts :
196
+ text_len += len (str (prompt ))
197
+
198
+ for model in self .models :
199
+ print (model .model )
200
+ input_token_aproximations = text_len // 4
201
+
202
+ return input_token_aproximations
203
+
181
204
@staticmethod
182
205
def _get_container_class (object ):
183
206
from edsl .agents .AgentList import AgentList
You can’t perform that action at this time.
0 commit comments