Files
langchain-evolution-deck/slides/section1-chains/slide-24.js
T
petya 75601988c2 Initial commit: LangChain evolution tutorial deck (132 slides)
- Cover, TOC, 5 dividers, 3 recap slides
- 5 sections (chains, langgraph, deepagents, openswe, ecosystem)
- design-system.js with theme tokens + 9 helper functions
- research/: timeline + sources + per-tech notes
- final-compile.js + merge.js for rebuild pipeline
- output/: langchain-evolution.pptx (2.3 MB) + langchain-evolution.pdf (1.1 MB) + 7 sample previews
2026-06-22 11:29:03 +03:00

90 lines
3.6 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Slide 24: 1.0 vs 0.3 -- breaking changes and what is new
// Content slide: side-by-side comparison of what changed in v1.0.
const ds = require('./design-system');
function createSlide(pres, theme) {
const slide = pres.addSlide();
ds.helpers.slideBase(slide, pres, theme);
ds.helpers.addHeader(slide, pres, theme, {
eyebrow: 'STAGE 1: CHAINS',
section: 'Версии',
title: 'Что нового в 1.0 vs 0.3',
sectionNumber: 1,
});
// Two columns: OLD (0.x) vs NEW (1.0)
const colW = 4.35;
const colH = 3.3;
const colY = 1.5;
const leftX = 0.5;
const rightX = 5.15;
// OLD column
slide.addShape(pres.ShapeType.roundRect, {
x: leftX, y: colY, w: colW, h: colH,
fill: { color: theme.palette.state.dangerBg },
line: { color: theme.palette.state.danger, width: 1 },
rectRadius: 0.1,
});
slide.addText('0.x (legacy)', {
x: leftX + 0.2, y: colY + 0.15, w: colW - 0.3, h: 0.4,
fontFace: ds.helpers.withFallback(theme.fonts.ui),
fontSize: 18, bold: true,
color: theme.palette.state.danger,
valign: 'middle', margin: 0,
});
const oldItems = [
'create_react_agent / create_openai_functions_agent / create_structured_chat_agent',
'LLMChain, RetrievalQA, ConversationalRetrievalQA',
'ChatOpenAI / ChatAnthropic / ChatGoogleGenerativeAI отдельно',
'Кастомные callbacks для HITL и PII',
'Verbose LLMChain с ручным manage_prompts',
].map((t) => ({ text: '- ' + t + '\n', options: { fontFace: ds.helpers.withFallback(theme.fonts.ui), fontSize: 12, color: theme.palette.text.primary } }));
slide.addText(oldItems, {
x: leftX + 0.2, y: colY + 0.6, w: colW - 0.3, h: colH - 0.7,
valign: 'top', paraSpaceAfter: 6, margin: 0,
});
// NEW column
slide.addShape(pres.ShapeType.roundRect, {
x: rightX, y: colY, w: colW, h: colH,
fill: { color: theme.palette.state.successBg },
line: { color: theme.palette.state.success, width: 1 },
rectRadius: 0.1,
});
slide.addText('1.0 (current)', {
x: rightX + 0.2, y: colY + 0.15, w: colW - 0.3, h: 0.4,
fontFace: ds.helpers.withFallback(theme.fonts.ui),
fontSize: 18, bold: true,
color: theme.palette.state.success,
valign: 'middle', margin: 0,
});
const newItems = [
'create_agent -- единая точка входа (построен на LangGraph)',
'Middleware-система: HITL, PII, Summarization как first-class',
'init_chat_model("<provider>:<model>") -- один инициализатор',
'with_structured_output -- tool calling / provider-native JSON',
'Семантическое версионирование: до 2.0 breaking changes не будет',
'langchain-classic -- пакет для обратной совместимости legacy chains',
].map((t) => ({ text: '+ ' + t + '\n', options: { fontFace: ds.helpers.withFallback(theme.fonts.ui), fontSize: 12, color: theme.palette.text.primary } }));
slide.addText(newItems, {
x: rightX + 0.2, y: colY + 0.6, w: colW - 0.3, h: colH - 0.7,
valign: 'top', paraSpaceAfter: 6, margin: 0,
});
// Bottom callout: migration tip
ds.helpers.addCallout(slide, pres, theme, {
x: 0.5, y: 4.95, w: 9.0, h: 0.4,
kind: 'info',
text: 'Миграция: pip install langchain-classic -- legacy LLMChain/AgentExecutor работают, но новый код пишите на create_agent.',
});
ds.helpers.addSourceLine(slide, pres, theme, {
source: 'docs.langchain.com/oss/python/releases/langchain-v1',
});
ds.helpers.addPageNumber(slide, pres, theme, 24);
}
module.exports = { createSlide };