langchain/libs/experimental/langchain_experimental
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
..
agents experimental[patch]: update module doc strings (#19539) 2024-03-26 10:38:10 -04:00
autonomous_agents experimental[patch]: PromptTemplate import fix (#19617) 2024-03-26 17:03:13 -07:00
chat_models experimental[minor]: adds mixtral wrapper (#17423) 2024-03-08 17:14:23 -08:00
comprehend_moderation experimental[patch]: update module doc strings (#19539) 2024-03-26 10:38:10 -04:00
cpal experimental[patch]: update module doc strings (#19539) 2024-03-26 10:38:10 -04:00
data_anonymizer experimental[patch]: update module doc strings (#19539) 2024-03-26 10:38:10 -04:00
fallacy_removal experimental[patch]: update module doc strings (#19539) 2024-03-26 10:38:10 -04:00
generative_agents experimental[patch]: PromptTemplate import fix (#19617) 2024-03-26 17:03:13 -07:00
graph_transformers experimental[patch]: Enhance LLMGraphTransformer with async processing and improved readability (#19205) 2024-03-26 23:40:21 -07:00
llm_bash experimental[patch]: update module doc strings (#19539) 2024-03-26 10:38:10 -04:00
llm_symbolic_math experimental[patch]: update module doc strings (#19539) 2024-03-26 10:38:10 -04:00
llms experimental[patch]: update module doc strings (#19539) 2024-03-26 10:38:10 -04:00
open_clip experimental[patch]: update module doc strings (#19539) 2024-03-26 10:38:10 -04:00
openai_assistant Move OAI assistants to langchain and add callbacks (#13236) 2023-11-13 17:42:07 -08:00
pal_chain experimental[patch]: update module doc strings (#19539) 2024-03-26 10:38:10 -04:00
plan_and_execute experimental[patch]: update module doc strings (#19539) 2024-03-26 10:38:10 -04:00
prompt_injection_identifier experimental[patch]: update module doc strings (#19539) 2024-03-26 10:38:10 -04:00
prompts experimental[patch]: update module doc strings (#19539) 2024-03-26 10:38:10 -04:00
pydantic_v1
recommenders experimental[patch]: update module doc strings (#19539) 2024-03-26 10:38:10 -04:00
retrievers experimental[patch]: update module doc strings (#19539) 2024-03-26 10:38:10 -04:00
rl_chain experimental[patch]: update module doc strings (#19539) 2024-03-26 10:38:10 -04:00
smart_llm experimental[patch]: update module doc strings (#19539) 2024-03-26 10:38:10 -04:00
sql experimental[patch]: update module doc strings (#19539) 2024-03-26 10:38:10 -04:00
synthetic_data experimental[patch]: PromptTemplate import fix (#19617) 2024-03-26 17:03:13 -07:00
tabular_synthetic_data experimental[patch]: PromptTemplate import fix (#19617) 2024-03-26 17:03:13 -07:00
tools experimental[patch]: update module doc strings (#19539) 2024-03-26 10:38:10 -04:00
tot experimental[patch]: PromptTemplate import fix (#19617) 2024-03-26 17:03:13 -07:00
utilities experimental[patch]: update module doc strings (#19539) 2024-03-26 10:38:10 -04:00
__init__.py Add version to langchain_experimental (#11613) 2023-10-10 11:17:41 -04:00
py.typed
text_splitter.py experimental[patch]: update module doc strings (#19539) 2024-03-26 10:38:10 -04:00