langchain/libs/partners
junkeon 4fda7bf4f2
upstage[patch] : fix error handling in Layout Analysis parser (#22054)
This pull request addresses and fixes exception handling in the
UpstageLayoutAnalysisParser and enhances the test coverage by adding
error exception tests for the document loader. These improvements ensure
robust error handling and increase the reliability of the system when
dealing with external API calls and JSON responses.

### Changes Made
1. Fix Request Exception Handling:

- Issue: The existing implementation of UpstageLayoutAnalysisParser did
not properly handle exceptions thrown by the requests library, which
could lead to unhandled exceptions and potential crashes.
- Solution: Added comprehensive exception handling for
requests.RequestException to catch any request-related errors. This
includes logging the error details and raising a ValueError with a
meaningful error message.

2. Add Error Exception Tests for Document Loader:

- New Tests: Introduced new test cases to verify the robustness of the
UpstageLayoutAnalysisLoader against various error scenarios. The tests
ensure that the loader gracefully handles:
- RequestException: Simulates network issues or invalid API requests to
ensure appropriate error handling and user feedback.
- JSONDecodeError: Simulates scenarios where the API response is not a
valid JSON, ensuring the system does not crash and provides clear error
messaging.
2024-05-23 11:45:34 -04:00
..
ai21 ai21: AI21 Jamba docs (#21978) 2024-05-21 19:27:46 +00:00
airbyte airbyte[patch]: airbyte-cdk compatible pydantic versions (#21738) 2024-05-15 19:13:25 -07:00
anthropic infra: rm unused # noqa violations (#22049) 2024-05-22 15:21:08 -07:00
azure-dynamic-sessions docs: add aca-ds (#21746) 2024-05-16 08:52:07 +00:00
chroma docs: Chroma docstrings update (#22001) 2024-05-22 21:45:30 +00:00
exa multiple: releases with relaxed core dep (#21724) 2024-05-15 19:29:35 +00:00
fireworks core, standard tests, partner packages: add test for model params (#21677) 2024-05-17 13:51:26 -04:00
groq core, standard tests, partner packages: add test for model params (#21677) 2024-05-17 13:51:26 -04:00
huggingface docs: huggingface package (#21645) 2024-05-14 03:17:40 +00:00
ibm ibm[patch]: release 0.1.7 (#21737) 2024-05-15 19:10:15 -07:00
mistralai mistral: implement ls_params (#21867) 2024-05-20 11:49:48 -07:00
mongodb infra: rm unused # noqa violations (#22049) 2024-05-22 15:21:08 -07:00
nomic nomic: implement local embeddings with the inference_mode parameter (#21934) 2024-05-20 14:17:07 -07:00
openai infra: rm unused # noqa violations (#22049) 2024-05-22 15:21:08 -07:00
pinecone pinecone: bump min core version (#21742) 2024-05-15 19:31:43 -07:00
prompty multiple: releases with relaxed core dep (#21724) 2024-05-15 19:29:35 +00:00
qdrant infra: rm unused # noqa violations (#22049) 2024-05-22 15:21:08 -07:00
robocorp robocorp: release 0.0.8 (#22034) 2024-05-22 16:41:41 +00:00
together infra: rm unused # noqa violations (#22049) 2024-05-22 15:21:08 -07:00
upstage upstage[patch] : fix error handling in Layout Analysis parser (#22054) 2024-05-23 11:45:34 -04:00
voyageai partners: Remove unnecessary print from voyageai embeddings (#21865) 2024-05-18 08:57:17 -04:00