id
stringlengths
14
15
text
stringlengths
49
2.47k
source
stringlengths
61
166
110e7ca8530f-1
that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg id...
https://api.python.langchain.com/en/latest/tools/langchain.tools.multion.create_session.MultionCreateSession.html
110e7ca8530f-2
Bind arguments to a Runnable, returning a new Runnable. classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶ Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config...
https://api.python.langchain.com/en/latest/tools/langchain.tools.multion.create_session.MultionCreateSession.html
110e7ca8530f-3
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, encoder: Optional[Cal...
https://api.python.langchain.com/en/latest/tools/langchain.tools.multion.create_session.MultionCreateSession.html
110e7ca8530f-4
stream(input: Input, config: Optional[RunnableConfig] = None) → Iterator[Output]¶ classmethod update_forward_refs(**localns: Any) → None¶ Try to update ForwardRefs on fields based on this Model, globalns and localns. classmethod validate(value: Any) → Model¶ with_fallbacks(fallbacks: ~typing.Sequence[~langchain.schema....
https://api.python.langchain.com/en/latest/tools/langchain.tools.multion.create_session.MultionCreateSession.html
59c9991c185d-0
langchain.tools.base.Tool¶ class langchain.tools.base.Tool[source]¶ Bases: BaseTool Tool that takes in function or coroutine directly. Initialize tool. param args_schema: Optional[Type[pydantic.main.BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Option...
https://api.python.langchain.com/en/latest/tools/langchain.tools.base.Tool.html
59c9991c185d-1
that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg id...
https://api.python.langchain.com/en/latest/tools/langchain.tools.base.Tool.html
59c9991c185d-2
Bind arguments to a Runnable, returning a new Runnable. classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶ Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config...
https://api.python.langchain.com/en/latest/tools/langchain.tools.base.Tool.html
59c9991c185d-3
Initialize tool from a function. classmethod from_orm(obj: Any) → Model¶ invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_a...
https://api.python.langchain.com/en/latest/tools/langchain.tools.base.Tool.html
59c9991c185d-4
Run the tool. classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶ classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶ stream(input: Input, config: Optional[RunnableConfig] = None) → Iterat...
https://api.python.langchain.com/en/latest/tools/langchain.tools.base.Tool.html
59c9991c185d-5
ReAct document store OpenAI Multi Functions Agent Combine agents and vector stores Custom MRKL agent Handle parsing errors Shared memory across agents and tools Custom multi-action agent Running Agent as an Iterator Timeouts for agents Add Memory to OpenAI Functions Agent Cap the max number of iterations Custom agent U...
https://api.python.langchain.com/en/latest/tools/langchain.tools.base.Tool.html
950a07fa5d2d-0
langchain.tools.gmail.utils.import_installed_app_flow¶ langchain.tools.gmail.utils.import_installed_app_flow() → InstalledAppFlow[source]¶ Import InstalledAppFlow class. Returns InstalledAppFlow class. Return type InstalledAppFlow
https://api.python.langchain.com/en/latest/tools/langchain.tools.gmail.utils.import_installed_app_flow.html
31a52ca6730b-0
langchain.tools.file_management.file_search.FileSearchTool¶ class langchain.tools.file_management.file_search.FileSearchTool[source]¶ Bases: BaseFileToolMixin, BaseTool Tool that searches for files in a subdirectory that match a regex pattern. Create a new model by parsing and validating input data from keyword argumen...
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.file_search.FileSearchTool.html
31a52ca6730b-1
that after the tool is called, the AgentExecutor will stop looping. param root_dir: Optional[str] = None¶ The final path will be chosen relative to root_dir if specified. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call...
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.file_search.FileSearchTool.html
31a52ca6730b-2
bind(**kwargs: Any) → Runnable[Input, Output]¶ Bind arguments to a Runnable, returning a new Runnable. classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶ Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no othe...
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.file_search.FileSearchTool.html
31a52ca6730b-3
get_relative_path(file_path: str) → Path¶ Get the relative path, returning an error if unsupported. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, Mapp...
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.file_search.FileSearchTool.html
31a52ca6730b-4
Run the tool. classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶ classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶ stream(input: Input, config: Optional[RunnableConfig] = None) → Iterat...
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.file_search.FileSearchTool.html
c017c1db7a82-0
langchain.tools.gmail.utils.get_gmail_credentials¶ langchain.tools.gmail.utils.get_gmail_credentials(token_file: Optional[str] = None, client_secrets_file: Optional[str] = None, scopes: Optional[List[str]] = None) → Credentials[source]¶ Get credentials. Examples using get_gmail_credentials¶ Gmail Toolkit
https://api.python.langchain.com/en/latest/tools/langchain.tools.gmail.utils.get_gmail_credentials.html
0b5597f6dfb1-0
langchain.tools.office365.send_event.O365SendEvent¶ class langchain.tools.office365.send_event.O365SendEvent[source]¶ Bases: O365BaseTool Tool for sending calendar events in Office 365. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be par...
https://api.python.langchain.com/en/latest/tools/langchain.tools.office365.send_event.O365SendEvent.html
0b5597f6dfb1-1
Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as a...
https://api.python.langchain.com/en/latest/tools/langchain.tools.office365.send_event.O365SendEvent.html
0b5597f6dfb1-2
bind(**kwargs: Any) → Runnable[Input, Output]¶ Bind arguments to a Runnable, returning a new Runnable. classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶ Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no othe...
https://api.python.langchain.com/en/latest/tools/langchain.tools.office365.send_event.O365SendEvent.html
0b5597f6dfb1-3
classmethod from_orm(obj: Any) → Model¶ invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults...
https://api.python.langchain.com/en/latest/tools/langchain.tools.office365.send_event.O365SendEvent.html
0b5597f6dfb1-4
Run the tool. classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶ classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶ stream(input: Input, config: Optional[RunnableConfig] = None) → Iterat...
https://api.python.langchain.com/en/latest/tools/langchain.tools.office365.send_event.O365SendEvent.html
a3f0353af8cd-0
langchain.tools.nuclia.tool.NucliaUnderstandingAPI¶ class langchain.tools.nuclia.tool.NucliaUnderstandingAPI[source]¶ Bases: BaseTool Tool to process files with the Nuclia Understanding API. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot b...
https://api.python.langchain.com/en/latest/tools/langchain.tools.nuclia.tool.NucliaUnderstandingAPI.html
a3f0353af8cd-1
Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as a...
https://api.python.langchain.com/en/latest/tools/langchain.tools.nuclia.tool.NucliaUnderstandingAPI.html
a3f0353af8cd-2
bind(**kwargs: Any) → Runnable[Input, Output]¶ Bind arguments to a Runnable, returning a new Runnable. classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶ Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no othe...
https://api.python.langchain.com/en/latest/tools/langchain.tools.nuclia.tool.NucliaUnderstandingAPI.html
a3f0353af8cd-3
classmethod from_orm(obj: Any) → Model¶ invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults...
https://api.python.langchain.com/en/latest/tools/langchain.tools.nuclia.tool.NucliaUnderstandingAPI.html
a3f0353af8cd-4
Run the tool. classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶ classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶ stream(input: Input, config: Optional[RunnableConfig] = None) → Iterat...
https://api.python.langchain.com/en/latest/tools/langchain.tools.nuclia.tool.NucliaUnderstandingAPI.html
31a149f67f4c-0
langchain.tools.python.tool.PythonAstREPLTool¶ class langchain.tools.python.tool.PythonAstREPLTool[source]¶ Bases: BaseTool A tool for running python code in a REPL. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid ...
https://api.python.langchain.com/en/latest/tools/langchain.tools.python.tool.PythonAstREPLTool.html
31a149f67f4c-1
param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param sanitize_input: bool = True¶ param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None Thes...
https://api.python.langchain.com/en/latest/tools/langchain.tools.python.tool.PythonAstREPLTool.html
31a149f67f4c-2
batch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, max_concurrency: Optional[int] = None) → List[Output]¶ bind(**kwargs: Any) → Runnable[Input, Output]¶ Bind arguments to a Runnable, returning a new Runnable. classmethod construct(_fields_set: Optional[SetStr] = None, **...
https://api.python.langchain.com/en/latest/tools/langchain.tools.python.tool.PythonAstREPLTool.html
31a149f67f4c-3
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude. classmethod from_orm(obj: Any) → Model¶ invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None...
https://api.python.langchain.com/en/latest/tools/langchain.tools.python.tool.PythonAstREPLTool.html
31a149f67f4c-4
Run the tool. classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶ classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶ stream(input: Input, config: Optional[RunnableConfig] = None) → Iterat...
https://api.python.langchain.com/en/latest/tools/langchain.tools.python.tool.PythonAstREPLTool.html
42bb79f8ce81-0
langchain.tools.file_management.write.WriteFileInput¶ class langchain.tools.file_management.write.WriteFileInput[source]¶ Bases: BaseModel Input for WriteFileTool. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid mo...
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.write.WriteFileInput.html
42bb79f8ce81-1
deep – set to True to make a deep copy of the model Returns new model instance dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, ex...
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.write.WriteFileInput.html
42bb79f8ce81-2
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶ classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶ classmethod update_forward_refs(**localns: Any) → None¶ Try to update ForwardRefs on...
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.write.WriteFileInput.html
0ab377126849-0
langchain.tools.office365.create_draft_message.O365CreateDraftMessage¶ class langchain.tools.office365.create_draft_message.O365CreateDraftMessage[source]¶ Bases: O365BaseTool Tool for creating a draft email in Office 365. Create a new model by parsing and validating input data from keyword arguments. Raises Validation...
https://api.python.langchain.com/en/latest/tools/langchain.tools.office365.create_draft_message.O365CreateDraftMessage.html
0ab377126849-1
param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each...
https://api.python.langchain.com/en/latest/tools/langchain.tools.office365.create_draft_message.O365CreateDraftMessage.html
0ab377126849-2
bind(**kwargs: Any) → Runnable[Input, Output]¶ Bind arguments to a Runnable, returning a new Runnable. classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶ Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no othe...
https://api.python.langchain.com/en/latest/tools/langchain.tools.office365.create_draft_message.O365CreateDraftMessage.html
0ab377126849-3
classmethod from_orm(obj: Any) → Model¶ invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults...
https://api.python.langchain.com/en/latest/tools/langchain.tools.office365.create_draft_message.O365CreateDraftMessage.html
0ab377126849-4
Run the tool. classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶ classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶ stream(input: Input, config: Optional[RunnableConfig] = None) → Iterat...
https://api.python.langchain.com/en/latest/tools/langchain.tools.office365.create_draft_message.O365CreateDraftMessage.html
4606e8f4f919-0
langchain.tools.azure_cognitive_services.utils.download_audio_from_url¶ langchain.tools.azure_cognitive_services.utils.download_audio_from_url(audio_url: str) → str[source]¶ Download audio from url to local.
https://api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.utils.download_audio_from_url.html
6b0f6b619943-0
langchain.tools.amadeus.closest_airport.ClosestAirportSchema¶ class langchain.tools.amadeus.closest_airport.ClosestAirportSchema[source]¶ Bases: BaseModel Schema for the AmadeusClosestAirport tool. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data c...
https://api.python.langchain.com/en/latest/tools/langchain.tools.amadeus.closest_airport.ClosestAirportSchema.html
6b0f6b619943-1
the new model: you should trust this data deep – set to True to make a deep copy of the model Returns new model instance dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[boo...
https://api.python.langchain.com/en/latest/tools/langchain.tools.amadeus.closest_airport.ClosestAirportSchema.html
6b0f6b619943-2
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶ classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶ classmethod update_forward_refs(**localns: Any) → None¶ Try to update ForwardRefs on...
https://api.python.langchain.com/en/latest/tools/langchain.tools.amadeus.closest_airport.ClosestAirportSchema.html
a277ee0e7a82-0
langchain.tools.base.StructuredTool¶ class langchain.tools.base.StructuredTool[source]¶ Bases: BaseTool Tool that can operate on any number of inputs. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param ar...
https://api.python.langchain.com/en/latest/tools/langchain.tools.base.StructuredTool.html
a277ee0e7a82-1
param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each...
https://api.python.langchain.com/en/latest/tools/langchain.tools.base.StructuredTool.html
a277ee0e7a82-2
bind(**kwargs: Any) → Runnable[Input, Output]¶ Bind arguments to a Runnable, returning a new Runnable. classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶ Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no othe...
https://api.python.langchain.com/en/latest/tools/langchain.tools.base.StructuredTool.html
a277ee0e7a82-3
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude. classmethod from_function(func: Callable, name: Optional[str] = None, description: Optional[str] = None, return_direct: bool = False, args_schema: Optional[Type[BaseModel]] = None, infer_schema: bool = True, **k...
https://api.python.langchain.com/en/latest/tools/langchain.tools.base.StructuredTool.html
a277ee0e7a82-4
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, encoder: Optional[Cal...
https://api.python.langchain.com/en/latest/tools/langchain.tools.base.StructuredTool.html
a277ee0e7a82-5
stream(input: Input, config: Optional[RunnableConfig] = None) → Iterator[Output]¶ classmethod update_forward_refs(**localns: Any) → None¶ Try to update ForwardRefs on fields based on this Model, globalns and localns. classmethod validate(value: Any) → Model¶ with_fallbacks(fallbacks: ~typing.Sequence[~langchain.schema....
https://api.python.langchain.com/en/latest/tools/langchain.tools.base.StructuredTool.html
a0ae616d1057-0
langchain.server.main¶ langchain.server.main() → None[source]¶ Run the langchain server locally.
https://api.python.langchain.com/en/latest/server/langchain.server.main.html
8bc625d3bce3-0
langchain.graphs.arangodb_graph.get_arangodb_client¶ langchain.graphs.arangodb_graph.get_arangodb_client(url: Optional[str] = None, dbname: Optional[str] = None, username: Optional[str] = None, password: Optional[str] = None) → Any[source]¶ Get the Arango DB client from credentials. Parameters url – Arango DB url. Can ...
https://api.python.langchain.com/en/latest/graphs/langchain.graphs.arangodb_graph.get_arangodb_client.html
557fbf0f6b7a-0
langchain.graphs.memgraph_graph.MemgraphGraph¶ class langchain.graphs.memgraph_graph.MemgraphGraph(url: str, username: str, password: str, *, database: str = 'memgraph')[source]¶ Memgraph wrapper for graph operations. Create a new Memgraph graph wrapper instance. Attributes get_schema Returns the schema of the Neo4j da...
https://api.python.langchain.com/en/latest/graphs/langchain.graphs.memgraph_graph.MemgraphGraph.html
7fa032e64821-0
langchain.graphs.kuzu_graph.KuzuGraph¶ class langchain.graphs.kuzu_graph.KuzuGraph(db: Any, database: str = 'kuzu')[source]¶ Kùzu wrapper for graph operations. Attributes get_schema Returns the schema of the Kùzu database Methods __init__(db[, database]) query(query[, params]) Query Kùzu database refresh_schema() Refre...
https://api.python.langchain.com/en/latest/graphs/langchain.graphs.kuzu_graph.KuzuGraph.html
af1f8bf5eb50-0
langchain.graphs.neo4j_graph.Neo4jGraph¶ class langchain.graphs.neo4j_graph.Neo4jGraph(url: str, username: str, password: str, database: str = 'neo4j')[source]¶ Neo4j wrapper for graph operations. Create a new Neo4j graph wrapper instance. Attributes get_schema Returns the schema of the Neo4j database Methods __init__(...
https://api.python.langchain.com/en/latest/graphs/langchain.graphs.neo4j_graph.Neo4jGraph.html
55bc1275503d-0
langchain.graphs.neptune_graph.NeptuneGraph¶ class langchain.graphs.neptune_graph.NeptuneGraph(host: str, port: int = 8182, use_https: bool = True)[source]¶ Neptune wrapper for graph operations. This version does not support Sigv4 signing of requests. Example graph = NeptuneGraph(host=’<my-cluster>’, port=8182 ) Create...
https://api.python.langchain.com/en/latest/graphs/langchain.graphs.neptune_graph.NeptuneGraph.html
83b0434785d0-0
langchain.graphs.rdf_graph.RdfGraph¶ class langchain.graphs.rdf_graph.RdfGraph(source_file: Optional[str] = None, serialization: Optional[str] = 'ttl', query_endpoint: Optional[str] = None, update_endpoint: Optional[str] = None, standard: Optional[str] = 'rdf', local_copy: Optional[str] = None)[source]¶ RDFlib wrapper ...
https://api.python.langchain.com/en/latest/graphs/langchain.graphs.rdf_graph.RdfGraph.html
83b0434785d0-1
serialization – serialization of the input query_endpoint – SPARQL endpoint for queries, read access update_endpoint – SPARQL endpoint for UPDATE queries, write access standard – RDF, RDFS, or OWL local_copy – new local copy for storing changes load_schema() → None[source]¶ Load the graph schema information. query(quer...
https://api.python.langchain.com/en/latest/graphs/langchain.graphs.rdf_graph.RdfGraph.html
169b828d9762-0
langchain.graphs.hugegraph.HugeGraph¶ class langchain.graphs.hugegraph.HugeGraph(username: str = 'default', password: str = 'default', address: str = '127.0.0.1', port: int = 8081, graph: str = 'hugegraph')[source]¶ HugeGraph wrapper for graph operations Create a new HugeGraph wrapper instance. Attributes get_schema Re...
https://api.python.langchain.com/en/latest/graphs/langchain.graphs.hugegraph.HugeGraph.html
ac5bdd62b6ff-0
langchain.graphs.neptune_graph.NeptuneQueryException¶ class langchain.graphs.neptune_graph.NeptuneQueryException(exception: Union[str, Dict])[source]¶ A class to handle queries that fail to execute
https://api.python.langchain.com/en/latest/graphs/langchain.graphs.neptune_graph.NeptuneQueryException.html
5767e16859dc-0
langchain.graphs.networkx_graph.NetworkxEntityGraph¶ class langchain.graphs.networkx_graph.NetworkxEntityGraph(graph: Optional[Any] = None)[source]¶ Networkx wrapper for entity graph operations. Create a new graph. Methods __init__([graph]) Create a new graph. add_triple(knowledge_triple) Add a triple to the graph. cle...
https://api.python.langchain.com/en/latest/graphs/langchain.graphs.networkx_graph.NetworkxEntityGraph.html
5767e16859dc-1
Get information about an entity. get_topological_sort() → List[str][source]¶ Get a list of entity names in the graph sorted by causal dependence. get_triples() → List[Tuple[str, str, str]][source]¶ Get all triples in the graph. write_to_gml(path: str) → None[source]¶ Examples using NetworkxEntityGraph¶ Graph QA
https://api.python.langchain.com/en/latest/graphs/langchain.graphs.networkx_graph.NetworkxEntityGraph.html
dd15c2fb0e53-0
langchain.graphs.arangodb_graph.ArangoGraph¶ class langchain.graphs.arangodb_graph.ArangoGraph(db: Any)[source]¶ ArangoDB wrapper for graph operations. Create a new ArangoDB graph wrapper instance. Attributes db schema Methods __init__(db) Create a new ArangoDB graph wrapper instance. from_db_credentials([url, dbname, ...
https://api.python.langchain.com/en/latest/graphs/langchain.graphs.arangodb_graph.ArangoGraph.html
dd15c2fb0e53-1
ARANGODB_PASSWORD. Defaults to “”. Returns An arango.database.StandardDatabase. generate_schema(sample_ratio: float = 0) → Dict[str, List[Dict[str, Any]]][source]¶ Generates the schema of the ArangoDB Database and returns it User can specify a sample_ratio (0 to 1) to determine the ratio of documents/edges used (in rel...
https://api.python.langchain.com/en/latest/graphs/langchain.graphs.arangodb_graph.ArangoGraph.html
01dfaaf40400-0
langchain.graphs.networkx_graph.KnowledgeTriple¶ class langchain.graphs.networkx_graph.KnowledgeTriple(subject: str, predicate: str, object_: str)[source]¶ A triple in the graph. Create new instance of KnowledgeTriple(subject, predicate, object_) Attributes object_ Alias for field number 2 predicate Alias for field num...
https://api.python.langchain.com/en/latest/graphs/langchain.graphs.networkx_graph.KnowledgeTriple.html
d070bb60be8c-0
langchain.graphs.nebula_graph.NebulaGraph¶ class langchain.graphs.nebula_graph.NebulaGraph(space: str, username: str = 'root', password: str = 'nebula', address: str = '127.0.0.1', port: int = 9669, session_pool_size: int = 30)[source]¶ NebulaGraph wrapper for graph operations NebulaGraph inherits methods from Neo4jGra...
https://api.python.langchain.com/en/latest/graphs/langchain.graphs.nebula_graph.NebulaGraph.html
0124db558222-0
langchain.graphs.networkx_graph.get_entities¶ langchain.graphs.networkx_graph.get_entities(entity_str: str) → List[str][source]¶ Extract entities from entity string.
https://api.python.langchain.com/en/latest/graphs/langchain.graphs.networkx_graph.get_entities.html
9f18b1812d21-0
langchain.graphs.networkx_graph.parse_triples¶ langchain.graphs.networkx_graph.parse_triples(knowledge_str: str) → List[KnowledgeTriple][source]¶ Parse knowledge triples from the knowledge string.
https://api.python.langchain.com/en/latest/graphs/langchain.graphs.networkx_graph.parse_triples.html
aefff8f4b7fb-0
langchain.prompts.pipeline.PipelinePromptTemplate¶ class langchain.prompts.pipeline.PipelinePromptTemplate[source]¶ Bases: BasePromptTemplate A prompt template for composing multiple prompt templates together. This can be useful when you want to reuse parts of prompts. A PipelinePrompt consists of two main parts: final...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.pipeline.PipelinePromptTemplate.html
aefff8f4b7fb-1
batch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, max_concurrency: Optional[int] = None) → List[Output]¶ bind(**kwargs: Any) → Runnable[Input, Output]¶ Bind arguments to a Runnable, returning a new Runnable. classmethod construct(_fields_set: Optional[SetStr] = None, **...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.pipeline.PipelinePromptTemplate.html
aefff8f4b7fb-2
format_prompt(**kwargs: Any) → PromptValue[source]¶ Create Chat Messages. classmethod from_orm(obj: Any) → Model¶ invoke(input: Dict, config: langchain.schema.runnable.RunnableConfig | None = None) → PromptValue¶ json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[Abstr...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.pipeline.PipelinePromptTemplate.html
aefff8f4b7fb-3
Example: .. code-block:: python prompt.save(file_path=”path/prompt.yaml”) classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶ classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶ stream(inp...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.pipeline.PipelinePromptTemplate.html
4275a2ae634e-0
langchain.prompts.chat.BaseChatPromptTemplate¶ class langchain.prompts.chat.BaseChatPromptTemplate[source]¶ Bases: BasePromptTemplate, ABC Base class for chat prompt templates. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to fo...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.chat.BaseChatPromptTemplate.html
4275a2ae634e-1
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny] = None, deep: bool = False) → Model¶ Duplicate a model, optionally...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.chat.BaseChatPromptTemplate.html
4275a2ae634e-2
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, encoder: Optional[Cal...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.chat.BaseChatPromptTemplate.html
4275a2ae634e-3
stream(input: Input, config: Optional[RunnableConfig] = None) → Iterator[Output]¶ to_json() → Union[SerializedConstructor, SerializedNotImplemented]¶ to_json_not_implemented() → SerializedNotImplemented¶ classmethod update_forward_refs(**localns: Any) → None¶ Try to update ForwardRefs on fields based on this Model, glo...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.chat.BaseChatPromptTemplate.html
189e8fc53655-0
langchain.prompts.example_selector.base.BaseExampleSelector¶ class langchain.prompts.example_selector.base.BaseExampleSelector[source]¶ Interface for selecting examples to include in prompts. Methods __init__() add_example(example) Add new example to store for a key. select_examples(input_variables) Select which exampl...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.example_selector.base.BaseExampleSelector.html
14581543a231-0
langchain.prompts.chat.MessagesPlaceholder¶ class langchain.prompts.chat.MessagesPlaceholder[source]¶ Bases: BaseMessagePromptTemplate Prompt template that assumes variable is already list of messages. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input da...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.chat.MessagesPlaceholder.html
14581543a231-1
deep – set to True to make a deep copy of the model Returns new model instance dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, ex...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.chat.MessagesPlaceholder.html
14581543a231-2
classmethod parse_obj(obj: Any) → Model¶ classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶ classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶ classmet...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.chat.MessagesPlaceholder.html
e250371b4a7c-0
langchain.prompts.chat.ChatMessagePromptTemplate¶ class langchain.prompts.chat.ChatMessagePromptTemplate[source]¶ Bases: BaseStringMessagePromptTemplate Chat message prompt template. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.chat.ChatMessagePromptTemplate.html
e250371b4a7c-1
deep – set to True to make a deep copy of the model Returns new model instance dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, ex...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.chat.ChatMessagePromptTemplate.html
e250371b4a7c-2
Returns A new instance of this class. json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_non...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.chat.ChatMessagePromptTemplate.html
e250371b4a7c-3
classmethod validate(value: Any) → Model¶ property input_variables: List[str]¶ Input variables for this prompt template. Returns List of input variable names. property lc_attributes: Dict¶ Return a list of attribute names that should be included in the serialized kwargs. These attributes must be accepted by the constru...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.chat.ChatMessagePromptTemplate.html
025a24d98247-0
langchain.prompts.example_selector.ngram_overlap.NGramOverlapExampleSelector¶ class langchain.prompts.example_selector.ngram_overlap.NGramOverlapExampleSelector[source]¶ Bases: BaseExampleSelector, BaseModel Select and order examples based on ngram overlap score (sentence_bleu score). https://www.nltk.org/_modules/nltk...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.example_selector.ngram_overlap.NGramOverlapExampleSelector.html
025a24d98247-1
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny] = None, deep: bool = False) → Model¶ Duplicate a model, optionally...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.example_selector.ngram_overlap.NGramOverlapExampleSelector.html
025a24d98247-2
classmethod from_orm(obj: Any) → Model¶ json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_n...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.example_selector.ngram_overlap.NGramOverlapExampleSelector.html
025a24d98247-3
classmethod update_forward_refs(**localns: Any) → None¶ Try to update ForwardRefs on fields based on this Model, globalns and localns. classmethod validate(value: Any) → Model¶ Examples using NGramOverlapExampleSelector¶ Select by n-gram overlap
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.example_selector.ngram_overlap.NGramOverlapExampleSelector.html
d3de2c9f1b3c-0
langchain.prompts.chat.ChatPromptTemplate¶ class langchain.prompts.chat.ChatPromptTemplate[source]¶ Bases: BaseChatPromptTemplate, ABC A prompt template for chat models. Use to create flexible templated prompts for chat models. Examples from langchain.prompts import ChatPromptTemplate template = ChatPromptTemplate.from...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.chat.ChatPromptTemplate.html
d3de2c9f1b3c-1
batch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, max_concurrency: Optional[int] = None) → List[Output]¶ bind(**kwargs: Any) → Runnable[Input, Output]¶ Bind arguments to a Runnable, returning a new Runnable. classmethod construct(_fields_set: Optional[SetStr] = None, **...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.chat.ChatPromptTemplate.html
d3de2c9f1b3c-2
formatted string format_messages(**kwargs: Any) → List[BaseMessage][source]¶ Format the chat template into a list of finalized messages. Parameters **kwargs – keyword arguments to use for filling in template variables in all the template messages in this chat template. Returns list of formatted messages format_prompt(*...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.chat.ChatPromptTemplate.html
d3de2c9f1b3c-3
Returns a chat prompt template classmethod from_orm(obj: Any) → Model¶ classmethod from_role_strings(string_messages: List[Tuple[str, str]]) → ChatPromptTemplate[source]¶ Create a chat prompt template from a list of (role, template) tuples. Parameters string_messages – list of (role, template) tuples. Returns a chat pr...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.chat.ChatPromptTemplate.html
d3de2c9f1b3c-4
classmethod parse_file(path: Union[str, Path], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶ classmethod parse_obj(obj: Any) → Model¶ classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.chat.ChatPromptTemplate.html
d3de2c9f1b3c-5
to_json() → Union[SerializedConstructor, SerializedNotImplemented]¶ to_json_not_implemented() → SerializedNotImplemented¶ classmethod update_forward_refs(**localns: Any) → None¶ Try to update ForwardRefs on fields based on this Model, globalns and localns. classmethod validate(value: Any) → Model¶ with_fallbacks(fallba...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.chat.ChatPromptTemplate.html
34d4762170eb-0
langchain.prompts.chat.AIMessagePromptTemplate¶ class langchain.prompts.chat.AIMessagePromptTemplate[source]¶ Bases: BaseStringMessagePromptTemplate AI message prompt template. This is a message that is not sent to the user. Create a new model by parsing and validating input data from keyword arguments. Raises Validati...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.chat.AIMessagePromptTemplate.html
34d4762170eb-1
deep – set to True to make a deep copy of the model Returns new model instance dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, ex...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.chat.AIMessagePromptTemplate.html
34d4762170eb-2
Returns A new instance of this class. json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_non...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.chat.AIMessagePromptTemplate.html
34d4762170eb-3
classmethod validate(value: Any) → Model¶ property input_variables: List[str]¶ Input variables for this prompt template. Returns List of input variable names. property lc_attributes: Dict¶ Return a list of attribute names that should be included in the serialized kwargs. These attributes must be accepted by the constru...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.chat.AIMessagePromptTemplate.html
a161b033831c-0
langchain.prompts.base.StringPromptTemplate¶ class langchain.prompts.base.StringPromptTemplate[source]¶ Bases: BasePromptTemplate, ABC String prompt that exposes the format method, returning a prompt. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input dat...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.base.StringPromptTemplate.html
a161b033831c-1
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny] = None, deep: bool = False) → Model¶ Duplicate a model, optionally...
https://api.python.langchain.com/en/latest/prompts/langchain.prompts.base.StringPromptTemplate.html