Open source
EduChain
An educational Python framework inspired by LangChain — built from scratch to understand how modern LLM frameworks work internally.
Python 3.10+MIT LicenseTests passingPyPI: educhain-dks
educhain.py
from educhain.prompts import PromptTemplate
from educhain.models import ChatModel
from educhain.output_parsers import StringOutputParser
prompt = PromptTemplate(
template="Explain {topic} in simple words.",
input_variables=["topic"]
)
model = ChatModel()
parser = StringOutputParser()
chain = prompt | model | parser
response = chain.invoke({"topic": "Artificial Intelligence"})
print(response)