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

feat/when used requests,may need a kwargs to support requests special params like verify #3005

Closed
qingdengyue opened this issue May 11, 2024 · 3 comments
Labels
enhancement New feature or request needs follow up

Comments

@qingdengyue
Copy link

Is your feature request related to a problem? Please describe.

I have been digging into the Langchain code. The UNSTRUCTURED_API_URL appears to utilize partition_multiple_via_api within unstructured.partition.api
detail ref:langchain-ai/langchain#21488
The user is using a private URL, and its SSL is private, so it requires to skip SSL verification for requests.
and now. partition_multiple_via_api no way to do that

Describe the solution you'd like
It seems to me that we might consider providing **kwargs to support this scenario.
requests support params: https://github.com/psf/requests/blob/2d5f54779ad174035c5437b3b3c1146b0eaf60fe/src/requests/api.py#L14

Describe alternatives you've considered
Perhaps we could reuse **request_kwargs which contains request data. We can retrieve parameters from **request_kwargs and utilize them in requests.
partition_multiple_via_api:

def partition_multiple_via_api(

Additional context
Add any other context or screenshots about the feature request here.

@MthwRobinson
Copy link
Contributor

The unstructured-python-client is the preferred way to call the API now. @awalker4 - do you know if the client supports turning off SSL verify?

Separately, added an issue internally to update the LangChain loaders to use the AP client instead of partition_via_api.

@awalker4
Copy link
Contributor

We can pass a custom requests.Session to the unstructured-client like this. We can certainly add a flag to the Loader to set this up before the partition call.

@MthwRobinson
Copy link
Contributor

Thanks! Please reference the link @awalker4 provided above if you need to use the API without SSL verification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs follow up
Projects
None yet
Development

No branches or pull requests

3 participants