mem0
mem0 copied to clipboard
Bug Fix: Add missing _parse_response to AzureOpenAIStructuredLLM
Description
AzureOpenAILLM has the self._parse_response() method for parsing structured outputs, but this class is not used when using structured outputs, instead AzureOpenAIStructuredLLM is used but it's missing self._parse_response() so the generate_response() fails in the return on line 69. This PR simply copies the self._parse_response() method over and now it works as intended.
The same issue existed in regular OpenAI structured outputs so I have fixed it in the same way as the Azure version.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
- [ x ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Refactor (does not change functionality, e.g. code style improvements, linting)
- [ ] Documentation update
How Has This Been Tested?
forked repo
Checklist:
- [ x ] My code follows the style guidelines of this project
- [ x ] I have performed a self-review of my own code
- [ x ] I have commented my code, particularly in hard-to-understand areas
- [ x ] I have made corresponding changes to the documentation
- [ x ] My changes generate no new warnings
- [ x ] I have added tests that prove my fix is effective or that my feature works
- [ x ] New and existing unit tests pass locally with my changes
- [ x ] Any dependent changes have been merged and published in downstream modules
- [ x ] I have checked my code and corrected any misspellings
Maintainer Checklist
- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [ ] Made sure Checks passed
@Dev-Khant @whysosaket for visibility. Also blocked by this, ty
@Dev-Khant is there anything I need to do here? It says checks failed but that I don't have access to fix it.
Is there any progress? The Azure API is currently not usable.
@Dev-Khant can you please review this for inclusion into the next release?
Hey @hayescode thanks for this PR. Can you please fix the failing tests to get things started? Thanks!