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

Fix issue with Azure OpenAI and metrics usage #732

Merged
merged 1 commit into from
Jul 10, 2024
Merged

Fix issue with Azure OpenAI and metrics usage #732

merged 1 commit into from
Jul 10, 2024

Conversation

geoand
Copy link
Collaborator

@geoand geoand commented Jul 8, 2024

Essentially the ChatLanguageModel was being
built too early thus messing up the construction
order of the dependencies

@geoand
Copy link
Collaborator Author

geoand commented Jul 8, 2024

This fails because of the use cce6303 - I'll first need to fix that

@geoand
Copy link
Collaborator Author

geoand commented Jul 8, 2024

This needs more thought on how to deal properly with the combination of the various features

@andreadimaio
Copy link
Contributor

andreadimaio commented Jul 8, 2024

I moved the builder.build() outside of the Supplier<> to have the same instance for the ChatLanguageModel and the TokenCountEstimator. This is also done for the watsonx and bam modules, so if the fix is to put the operation inside, we should do the same for the other two modules.

@andreadimaio
Copy link
Contributor

And also remove the following lines from the MultipleTokenCountEstimatorProvidersTest class: #50, #57, #64

@geoand
Copy link
Collaborator Author

geoand commented Jul 9, 2024

Yup, I'm going to revert those changes

@geoand
Copy link
Collaborator Author

geoand commented Jul 9, 2024

I tried a few things, but in the end the obvious fix is the one that makes most sense

Essentially the ChatLanguageModel was being
built too early thus messing up the construction
order of the dependencies

Fixes: #731
@geoand geoand merged commit 134d53a into main Jul 10, 2024
12 checks passed
@geoand geoand deleted the #731 branch July 10, 2024 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrading 0.15.1 to 0.16.1 causes issues with micrometer
2 participants