Documentation
Documentation
Welcome to the EduChain docs. Use the sidebar to explore installation, core concepts, and examples. Content for each page is coming soon.
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)