examples/sequential-chain-example/README.md
Welcome to the Sequential Chain Example! This Go program demonstrates how to use the LangChain library to create and run sequential chains of language models. It's a fun and practical way to see how multiple AI models can work together to generate creative content.
This example showcases two types of sequential chains:
Let's break down each example:
In this part, we create a chain that:
The process goes like this:
Play Title -> AI Playwright -> Synopsis -> AI Critic -> Review
This more advanced chain:
The process looks like this:
Play Title ─┐
└─> AI Playwright -> Synopsis -> AI Critic -> Review
Era ────────┘
The example uses OpenAI's language model and the LangChain library to create these chains. It demonstrates how to:
When you run this program, it will execute both the simple and complex sequential chain examples. You'll see the generated reviews printed to the console.
This example is a great way to understand how you can chain together multiple AI models to create more complex and interesting outputs. Have fun exploring the possibilities of sequential AI chains!