Comments (2)
Maybe we cound use openai's tiktoken to obtain an approximate estimation of token usage for a given text.
tiktoken will need to download an encoding file the first time it runs, and it should increase computational overhead. I think this feature should be off by default.
@nirga What do you think about it? If you think this approach is feasible and acceptable, I'm willing in adding this feature to OpenAI's instrumentor.
from openllmetry.
@Humbertzhang yep I think this is the way to go, and you are right - this should be off by default.
from openllmetry.
Related Issues (20)
- 🚀 Feature: Support Haystack v2 HOT 9
- 🐛 Bug Report: exceptions on instrumentation errors HOT 3
- 🐛 Bug Report: Sentry.io integration breaks HOT 1
- 🐛 Bug Report: Init failed when installing opentelemetry-instrumentation-openai HOT 1
- 🐛 Bug Report: Prompts and responses are only captured for OpenAI models HOT 5
- 🚀 Feature: Log prompts while preserving user PII with Presidio HOT 3
- 🐛 Bug Report: Error getting model name when using langchain BedrockChat HOT 3
- 🐛 Bug Report: LLamaCPP is not found by the CustomLLMInstrumentor llamaindex class HOT 3
- 🚀 Feature: Support runpod.ai HOT 2
- 🐛 Bug Report: Auto Instrumentation support for Watsonx HOT 2
- 🐛 Bug Report: AttributeError: 'NoneType' object has no attribute 'get' HOT 5
- 🚀 Feature: log content filter results in proper attributes (Azure OpenAI) HOT 7
- 🚀 Feature: Support Anthropic's Tools HOT 6
- 🚀 Feature: Update semantic convention based on latest GenAI Semantion Convention HOT 3
- 🚀 Feature: Add support for new pinecone versions HOT 1
- AttributeError: 'coroutine' object has no attribute 'get'
- TypeError: Object of type coroutine is not JSON serializable HOT 1
- 🐛 Bug Report: LLM response tracing not working for the latest version of LangChain-OpenAI HOT 1
- 🐛 Bug Report: Pinecone query asserts wrong type for filter HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openllmetry.