langchain/libs
Juan Jose Miguel Ovalle Villamil 1fe10a3e3d
experimental[patch]: Enhance LLMGraphTransformer with async processing and improved readability (#19205)
- [x] **PR title**: "experimental: Enhance LLMGraphTransformer with
async processing and improved readability"


- [x] **PR message**: 
- **Description:** This pull request refactors the `process_response`
and `convert_to_graph_documents` methods in the LLMGraphTransformer
class to improve code readability and adds async versions of these
methods for concurrent processing.
    The main changes include:
- Simplifying list comprehensions and conditional logic in the
process_response method for better readability.
- Adding async versions aprocess_response and
aconvert_to_graph_documents to enable concurrent processing of
documents.
These enhancements aim to improve the overall efficiency and
maintainability of the `LLMGraphTransformer` class.
  - **Issue:** N/A
  - **Dependencies:** No additional dependencies required.
  - **Twitter handle:** @jjovalle99


- [x] **Add tests and docs**: N/A (This PR does not introduce a new
integration)


- [x] **Lint and test**: Ran make format, make lint, and make test from
the root of the modified package(s). All tests pass successfully.

Additional notes:

- The changes made in this PR are backwards compatible and do not
introduce any breaking changes.
- The PR touches only the `LLMGraphTransformer` class within the
experimental package.

---------

Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
2024-03-26 23:40:21 -07:00
..
cli cli[patch]: release 0.0.22rc0, chat playground (#19614) 2024-03-26 15:08:56 -07:00
community community[patch]: Microsoft Azure Document Intelligence updates (#16932) 2024-03-26 23:36:59 -07:00
core docs: Update docstring for MessagesPlaceholder (#19601) 2024-03-26 14:34:00 -07:00
experimental experimental[patch]: Enhance LLMGraphTransformer with async processing and improved readability (#19205) 2024-03-26 23:40:21 -07:00
langchain langchain[patch]: Add async methods to EmbeddingRouterChain (#19603) 2024-03-26 14:33:36 -07:00
partners openai[patch]: fix AzureChatOpenAI missing parameter problem (#19258) 2024-03-26 22:31:36 -07:00
text-splitters splitters: Add ensure_ascii parameter (#18485) 2024-03-19 12:51:16 -07:00