Skip to main content
Open on GitHub

SWI-Prolog

SWI-Prolog offers a comprehensive free Prolog environment.

Installation and Setup

Install lanchain-prolog using pip:

pip install langchain-prolog

Tools

The PrologTool class allows the generation of langchain tools that use Prolog rules to generate answers.

from langchain_prolog import PrologConfig, PrologTool

See a usage example.

See the same guide for usage examples of PrologRunnable, which allows the generation of LangChain runnables that use Prolog rules to generate answers.


Was this page helpful?