mem0 icon indicating copy to clipboard operation
mem0 copied to clipboard

Feature/fix azure openai

Open r3dl3g opened this issue 1 year ago • 3 comments

Description

Changed the import of AzureChatOpenAI from langchain_community.chat_models to langchain_openai Merged code from openai.py to support streaming Changed default api_version to newest 24-02-01 Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • [X] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Please delete options that are not relevant.

  • [X] Test Script embedchain/examples/chat-pdf/app.py with 'llm.provider' = 'azure_openai' and available deployment_name and environment variabls AZURE_OPENAI_ENDPOINT and AZURE_OPENAI_API_KEY set.

Checklist:

  • [X] My code follows the style guidelines of this project
  • [X] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [X] My changes generate no new warnings
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] New and existing unit tests pass locally with my changes
  • [ ] 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

r3dl3g avatar Jun 18 '24 21:06 r3dl3g

Hi @r3dl3g Thanks a lot for adding the changes. Can you please check why tests are failing and also please add a test for streaming output?

You can use this as reference: https://github.com/embedchain/embedchain/blob/main/tests/llm/test_openai.py#L52

Dev-Khant avatar Jun 19 '24 17:06 Dev-Khant

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Jul 26 '24 02:07 CLAassistant

@r3dl3g Can you please check fix the conflicts and check the failing tests?

Dev-Khant avatar Aug 01 '24 18:08 Dev-Khant

thanks for your contribution @r3dl3g Closing this PR as there are so many merge conflicts. Please feel free to raise another PR.

taranjeet avatar Dec 03 '24 14:12 taranjeet