Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: '<' not supported between instances of 'NoneType' and 'int' #1044

Open
sentry-io bot opened this issue May 14, 2024 · 0 comments
Open

TypeError: '<' not supported between instances of 'NoneType' and 'int' #1044

sentry-io bot opened this issue May 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sentry-io
Copy link

sentry-io bot commented May 14, 2024

Sentry Issue: OPENLLMETRY-K

TypeError: '<' not supported between instances of 'NoneType' and 'int'
  File "/home/martin/.poetry/envs/src-GLSgO57w-py3.10/lib/python3.10/site-packages/opentelemetry/instrumentation/openai/utils.py", line 124, in wrapper
    return func(*args, **kwargs)
  File "/home/martin/.poetry/envs/src-GLSgO57w-py3.10/lib/python3.10/site-packages/opentelemetry/instrumentation/openai/shared/embeddings_wrappers.py", line 171, in _handle_response
    _set_embeddings_metrics(
  File "/home/martin/.poetry/envs/src-GLSgO57w-py3.10/lib/python3.10/site-packages/opentelemetry/instrumentation/openai/shared/embeddings_wrappers.py", line 205, in _set_embeddings_metrics
    token_counter.add(val, attributes=attributes_with_token_type)
  File "/home/martin/.poetry/envs/src-GLSgO57w-py3.10/lib/python3.10/site-packages/opentelemetry/metrics/_internal/instrument.py", line 206, in add
    self._real_instrument.add(amount, attributes)
  File "/home/martin/.poetry/envs/src-GLSgO57w-py3.10/lib/python3.10/site-packages/opentelemetry/sdk/metrics/_internal/instrument.py", line 154, in add
    if amount < 0:
@sentry-io sentry-io bot added the bug Something isn't working label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

0 participants