Skip to content

Commit 79b35df

Browse files
committed
Make openai cost calculator a static method
1 parent 65b0e65 commit 79b35df

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

openlayer/llm_monitors.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,9 @@ def _split_list(lst: List, n_parts: int) -> List[List]:
331331
start = end
332332
return result
333333

334+
@staticmethod
334335
def get_cost_estimate(
335-
self, num_input_tokens: int, num_output_tokens: int, model: str
336+
num_input_tokens: int, num_output_tokens: int, model: str
336337
) -> float:
337338
"""Returns the cost estimate for a given model and number of tokens."""
338339
if model not in constants.OPENAI_COST_PER_TOKEN:

openlayer/version.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@
2222
data=data,
2323
)
2424
"""
25-
__version__ = "0.1.0a24"
25+
26+
__version__ = "0.1.0a25"

0 commit comments

Comments
 (0)