-
-
Notifications
You must be signed in to change notification settings - Fork 105
[AI Bundle] Activate token usage output processors #329
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
[AI Bundle] Activate token usage output processors #329
Conversation
0229745
to
971b174
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Off topic, but should also be then integrated in the profiler 🙌🤓
src/ai-bundle/tests/DependencyInjection/Compiler/RegisterTokenUsageProcessorPassTest.php
Outdated
Show resolved
Hide resolved
Can that be done separately? |
Yes should be a follow up PR, maybe create an issue to not forget? |
5a1a420
to
157149b
Compare
157149b
to
86d0404
Compare
@chr-hertel |
86d0404
to
69448b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the indirection via the attribute here. there is no benefit, but only adds complexity to maintain.
We know in the bridge exactly for which platform the output processor is intended, could just register them as service (where does that currently happen?) and check for their existence while building the agent, like you did in AiBundle
class.
And please enable and test it with the demo - does it already work for you?
@chr-hertel |
5b03137
to
ec76240
Compare
d5b4e6b
to
e66c7a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please reduce the needed configuration to
track_token_usage: false
See #329 (comment)
And then we're good to merge after me testing it out :) 👍
e66c7a8
to
688ee24
Compare
688ee24
to
021b133
Compare
2f3147b
to
44d7b2f
Compare
Looks quite good to me |
- Adds support to automatically configure the token usage processors so that they are available to end users (devs) when needed - Makes the availability of token usage configurable and disabled by default feat(ai-bundle): Auto-configure token usage processors - Adds an example script inside mistral dir to verify the token usage refactor(ai-bundle): Auto-configure token usage processors - Removes the attribute to tag token usage output processors - Registers the token usage output processors as services manually inside ai bundle - Adds token usage information to the documentation
44d7b2f
to
b426948
Compare
Thank you @junaidbinfarooq. |
Fixed some namespaces and docs on merging + vertexai support |
Changes proposed: