chains#

Chains module for langchain_community

This module contains the community chains.

Classes

chains.graph_qa.arangodb.ArangoGraphQAChain

Chain for question-answering against a graph by generating AQL statements.

chains.graph_qa.base.GraphQAChain

Chain for question-answering against a graph.

chains.graph_qa.cypher.GraphCypherQAChain

Chain for question-answering against a graph by generating Cypher statements.

chains.graph_qa.cypher_utils.CypherQueryCorrector(schemas)

Used to correct relationship direction in generated Cypher statements.

chains.graph_qa.cypher_utils.Schema(...)

Create new instance of Schema(left_node, relation, right_node)

chains.graph_qa.falkordb.FalkorDBQAChain

Chain for question-answering against a graph by generating Cypher statements.

chains.graph_qa.gremlin.GremlinQAChain

Chain for question-answering against a graph by generating gremlin statements.

chains.graph_qa.hugegraph.HugeGraphQAChain

Chain for question-answering against a graph by generating gremlin statements.

chains.graph_qa.kuzu.KuzuQAChain

Question-answering against a graph by generating Cypher statements for Kùzu.

chains.graph_qa.nebulagraph.NebulaGraphQAChain

Chain for question-answering against a graph by generating nGQL statements.

chains.graph_qa.neptune_cypher.NeptuneOpenCypherQAChain

Chain for question-answering against a Neptune graph by generating openCypher statements.

chains.graph_qa.neptune_sparql.NeptuneSparqlQAChain

Chain for question-answering against a Neptune graph by generating SPARQL statements.

chains.graph_qa.ontotext_graphdb.OntotextGraphDBQAChain

Question-answering against Ontotext GraphDB

chains.graph_qa.sparql.GraphSparqlQAChain

Question-answering against an RDF or OWL graph by generating SPARQL statements.

chains.llm_requests.LLMRequestsChain

Chain that requests a URL and then uses an LLM to parse results.

chains.openapi.chain.OpenAPIEndpointChain

Chain interacts with an OpenAPI endpoint using natural language.

chains.openapi.requests_chain.APIRequesterChain

Get the request parser.

chains.openapi.requests_chain.APIRequesterOutputParser

Parse the request and error tags.

chains.openapi.response_chain.APIResponderChain

Get the response parser.

chains.openapi.response_chain.APIResponderOutputParser

Parse the response and error tags.

chains.pebblo_retrieval.base.PebbloRetrievalQA

Retrieval Chain with Identity & Semantic Enforcement for question-answering against a vector database.

chains.pebblo_retrieval.models.App

Create a new model by parsing and validating input data from keyword arguments.

chains.pebblo_retrieval.models.AuthContext

Class for an authorization context.

chains.pebblo_retrieval.models.ChainInfo

Create a new model by parsing and validating input data from keyword arguments.

chains.pebblo_retrieval.models.ChainInput

Input for PebbloRetrievalQA chain.

chains.pebblo_retrieval.models.Context

Create a new model by parsing and validating input data from keyword arguments.

chains.pebblo_retrieval.models.Framework

Langchain framework details

chains.pebblo_retrieval.models.Model

Create a new model by parsing and validating input data from keyword arguments.

chains.pebblo_retrieval.models.PkgInfo

Create a new model by parsing and validating input data from keyword arguments.

chains.pebblo_retrieval.models.Prompt

Create a new model by parsing and validating input data from keyword arguments.

chains.pebblo_retrieval.models.Qa

Create a new model by parsing and validating input data from keyword arguments.

chains.pebblo_retrieval.models.Runtime

OS, language details

chains.pebblo_retrieval.models.SemanticContext

Class for a semantic context.

chains.pebblo_retrieval.models.SemanticEntities

Class for a semantic entity filter.

chains.pebblo_retrieval.models.SemanticTopics

Class for a semantic topic filter.

chains.pebblo_retrieval.models.VectorDB

Create a new model by parsing and validating input data from keyword arguments.

chains.pebblo_retrieval.utilities.PebbloRetrievalAPIWrapper

Wrapper for Pebblo Retrieval API.

chains.pebblo_retrieval.utilities.Routes(value)

Routes available for the Pebblo API as enumerator.

Functions

chains.ernie_functions.base.convert_python_function_to_ernie_function(...)

Convert a Python function to an Ernie function-calling API compatible dict.

chains.ernie_functions.base.convert_to_ernie_function(...)

Convert a raw function/class to an Ernie function.

chains.ernie_functions.base.create_ernie_fn_chain(...)

[Legacy] Create an LLM chain that uses Ernie functions.

chains.ernie_functions.base.create_ernie_fn_runnable(...)

Create a runnable sequence that uses Ernie functions.

chains.ernie_functions.base.create_structured_output_chain(...)

[Legacy] Create an LLMChain that uses an Ernie function to get a structured output.

chains.ernie_functions.base.create_structured_output_runnable(...)

Create a runnable that uses an Ernie function to get a structured output.

chains.ernie_functions.base.get_ernie_output_parser(...)

Get the appropriate function output parser given the user functions.

chains.graph_qa.cypher.construct_schema(...)

Filter the schema based on included or excluded types

chains.graph_qa.cypher.extract_cypher(text)

Extract Cypher code from a text.

chains.graph_qa.cypher.get_function_response(...)

chains.graph_qa.falkordb.extract_cypher(text)

Extract Cypher code from a text.

chains.graph_qa.gremlin.extract_gremlin(text)

Extract Gremlin code from a text.

chains.graph_qa.kuzu.extract_cypher(text)

Extract Cypher code from a text.

chains.graph_qa.kuzu.remove_prefix(text, prefix)

Remove a prefix from a text.

chains.graph_qa.neptune_cypher.extract_cypher(text)

Extract Cypher code from text using Regex.

chains.graph_qa.neptune_cypher.trim_query(query)

Trim the query to only include Cypher keywords.

chains.graph_qa.neptune_cypher.use_simple_prompt(llm)

Decides whether to use the simple prompt

chains.graph_qa.neptune_sparql.extract_sparql(query)

Extract SPARQL code from a text.

chains.pebblo_retrieval.enforcement_filters.clear_enforcement_filters(...)

Clear the identity and semantic enforcement filters in the retriever search_kwargs.

chains.pebblo_retrieval.enforcement_filters.set_enforcement_filters(...)

Set identity and semantic enforcement filters in the retriever.

chains.pebblo_retrieval.utilities.get_ip()

Fetch local runtime ip address.

chains.pebblo_retrieval.utilities.get_runtime()

Fetch the current Framework and Runtime details.