Project 24: Calendar Assistant Bot
AI Engineer
Current Task
Objective
Review day: combine document loading and text splitting — days 10 and 11 — for a calendar event description.
Task: wrap an event description in a Document, split it into chunks, and print the chunk count.
index.py
from langchain_core.documents import Document
from langchain_text_splitters import RecursiveCharacterTextSplitter
event = Document(page_content="Quarterly planning meeting covering roadmap review, budget allocation, and team staffing for the next quarter.")
splitter = RecursiveCharacterTextSplitter(chunk_size=40, chunk_overlap=5)
chunks = splitter.split_text(event.page_content)
print(len(chunks))
* Hint: Correct characters turn green, incorrect ones turn red.
Live Preview
🖼️
Verify your code to see the preview