AgentOps-AI / tokencost

Easy token price estimates for 400+ LLMs. TokenOps.
https://agentops.ai
MIT License
1.48k stars 61 forks source link

Jamba 1.5 pricing missing #75

Closed the-praxs closed 2 months ago

the-praxs commented 2 months ago

Jamba 1.5 mini and large models pricing are missing and should be added here.

areibman commented 2 months ago

Try running update_prices.py

the-praxs commented 2 months ago

Works but also throws an exception for max_input_tokens on line 36

Traceback (most recent call last):
  File "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/tokencost/update_prices.py", line 36, in <module>
    df['max_input_tokens'] = df['max_input_tokens'].apply(lambda x: '{:,.0f}'.format(x))
  File "/opt/homebrew/Caskroom/miniconda/base/envs/ops/lib/python3.9/site-packages/pandas/core/series.py", line 4917, in apply
    return SeriesApply(
  File "/opt/homebrew/Caskroom/miniconda/base/envs/ops/lib/python3.9/site-packages/pandas/core/apply.py", line 1427, in apply
    return self.apply_standard()
  File "/opt/homebrew/Caskroom/miniconda/base/envs/ops/lib/python3.9/site-packages/pandas/core/apply.py", line 1507, in apply_standard
    mapped = obj._map_values(
  File "/opt/homebrew/Caskroom/miniconda/base/envs/ops/lib/python3.9/site-packages/pandas/core/base.py", line 921, in _map_values
    return algorithms.map_array(arr, mapper, na_action=na_action, convert=convert)
  File "/opt/homebrew/Caskroom/miniconda/base/envs/ops/lib/python3.9/site-packages/pandas/core/algorithms.py", line 1743, in map_array
    return lib.map_infer(values, mapper, convert=convert)
  File "lib.pyx", line 2972, in pandas._libs.lib.map_infer
  File "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/tokencost/update_prices.py", line 36, in <lambda>
    df['max_input_tokens'] = df['max_input_tokens'].apply(lambda x: '{:,.0f}'.format(x))
ValueError: Unknown format code 'f' for object of type 'str'
the-praxs commented 2 months ago

Works but also throws an exception for max_input_tokens on line 36

Traceback (most recent call last):
  File "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/tokencost/update_prices.py", line 36, in <module>
    df['max_input_tokens'] = df['max_input_tokens'].apply(lambda x: '{:,.0f}'.format(x))
  File "/opt/homebrew/Caskroom/miniconda/base/envs/ops/lib/python3.9/site-packages/pandas/core/series.py", line 4917, in apply
    return SeriesApply(
  File "/opt/homebrew/Caskroom/miniconda/base/envs/ops/lib/python3.9/site-packages/pandas/core/apply.py", line 1427, in apply
    return self.apply_standard()
  File "/opt/homebrew/Caskroom/miniconda/base/envs/ops/lib/python3.9/site-packages/pandas/core/apply.py", line 1507, in apply_standard
    mapped = obj._map_values(
  File "/opt/homebrew/Caskroom/miniconda/base/envs/ops/lib/python3.9/site-packages/pandas/core/base.py", line 921, in _map_values
    return algorithms.map_array(arr, mapper, na_action=na_action, convert=convert)
  File "/opt/homebrew/Caskroom/miniconda/base/envs/ops/lib/python3.9/site-packages/pandas/core/algorithms.py", line 1743, in map_array
    return lib.map_infer(values, mapper, convert=convert)
  File "lib.pyx", line 2972, in pandas._libs.lib.map_infer
  File "/Users/praxs/Library/CloudStorage/OneDrive-nyu.edu/Repositories/tokencost/update_prices.py", line 36, in <lambda>
    df['max_input_tokens'] = df['max_input_tokens'].apply(lambda x: '{:,.0f}'.format(x))
ValueError: Unknown format code 'f' for object of type 'str'

Found the culprit - missing values.

How are these values retrieved in the first place?