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

http_client and http_async_client bugfix #1454

Merged
merged 4 commits into from
Jul 2, 2024

Conversation

PranavPuranik
Copy link
Contributor

@PranavPuranik PranavPuranik commented Jun 30, 2024

Description

This would allow users to use pass proxy servers via config. It would allow them to use Embedchain behind a company's proxy setting.

Current implementation lacks creating of httpx or any HttpClient interface. It expects user a client in config, but there is no documentation on how to use it. I also believe its not possible to pass it this http_client value from the config.

This PR allows http proxies to be passed down from config instead, including async proxies (all
examples in unit tests). It creates a httpx.Client or httpx.AsyncClient as mentioned in the Langchain docs on behalf of the user.

Fixes #1452

Type of change

Please delete options that are not relevant.

  • 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?

I tested this on my AzureOpenAI instance, but could not test it for Openai.

I have unit tests for both, other pr adds azure.

  • Unit Test
  • Test Script (please provide)

Checklist:

  • My code follows the style guidelines of this project
  • 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
  • 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
  • I have checked my code and corrected any misspellings

Maintainer Checklist

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Made sure Checks passed

@deshraj deshraj merged commit 5258fd9 into mem0ai:main Jul 2, 2024
3 checks passed
@stnbSim
Copy link

stnbSim commented Oct 31, 2024

Hi @deshraj, any chance it will be included in the next release?

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.

How to use the http_client from BaseLlmConfig
3 participants