Comments (4)
@Wix97 From pf perspective, it would be complicated to define such a contract to summarize tokens according to the tokens.
I have a proposal: what if we expose the ability to get the tokens in other nodes?
For example, we provide such an experession: {llm_node_1.system_metrics.usage}
to get the usage dictionary of a node, then you can have a summary node to get the dictionary for yourself.
from promptflow.
Hi @Wix97 . Thanks for reaching us, could you please elaborate more about the 'usage of each AOAI connection deployment'? Is that related to any run, for example a batch run with different deployment, to get the usage of each deployment, or just overall token usage of a deployment? For the latter one, seems that should be the capability of AzureOpenAI instead of promptflow.
from promptflow.
Sorry for the confusion, the first case is what I wanted to mention here.
For example, there is a flow consuming 2 AOAI connections, each connection has 2 deployments. It would be helpful if promptflow can generate token usage report such like:
"token_usage": {
"connection_1": {
"connection_1_deployment_1": {
"prompt_tokens": 123,
"completion_tokens": 456
},
"connection_1_deployment_2": {
"prompt_tokens": 123,
"completion_tokens": 456
}
},
"connection_2": {
"connection_2_deployment_1": {
"prompt_tokens": 123,
"completion_tokens": 456
},
"connection_2_deployment_2": {
"prompt_tokens": 123,
"completion_tokens": 456
}
}
}
}
from promptflow.
LGTM👍
from promptflow.
Related Issues (20)
- Add Support for Image Generation with AzureOpenAI
- [BUG] Fallback to DefaultAzureCredential isn't compatible with AzureDeveloperCliCredential HOT 1
- [BUG] UnicodeEncodeError during evaluation HOT 5
- [BUG] pf connection create complains that creating an AI connection can't be done from PromptFlow HOT 6
- [BUG] Serving UI doesn't return flow result HOT 8
- [BUG] prompty-quickstart.ipynb run evaluation not working due to RuntimeError HOT 2
- [Feature Request] JSON formatted Logs
- chat pdf viewer code release? HOT 2
- [BUG] AI Search connection in `mlindex_content` not detected HOT 7
- [BUG] Connection for Azure OpenAI not working when following README procedure HOT 2
- [Feature Request]Export the eval result. HOT 2
- [BUG] Cannot resolve connection value from OS environments HOT 3
- [Feature Request] Remove Flask/FastAPI from promptflow-core dependencies? HOT 2
- [BUG] OTLP metrics error on export HOT 2
- [BUG] Setting OTEL_EXPORTER_OTLP_ENDPOINT causes export error HOT 3
- [BUG] LLM tool reports error code: 422 with Mistral-large HOT 2
- How do I use a different Python version for my custom promptflow runtime on AML? HOT 2
- [Feature Request] Add button to force restart promptflow server HOT 1
- [Feature Request] add native support to integrated vectorization query in Azure AI Search, when index lookup (node)
- [BUG] promptflow 1.11.0 raises IndexError: list index out of range 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 promptflow.