// Slide 12: TypeScript SDK + final ecosystem pros/cons // Two-column: code on left, pros/cons on right. 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 5: ECOSYSTEM', section: 'Итоги', title: 'TypeScript SDK и плюсы/минусы', sectionNumber: 5, titleSize: 24, }); // Left code block -- TypeScript SDK ds.helpers.addCodeBlock(slide, pres, theme, { x: 0.5, y: 1.45, w: 5.5, h: 3.1, language: 'typescript', fontSize: 10, code: [ 'import { Client, traceable } from "langsmith";', '', 'const client = new Client();', '', '// @traceable decorator -- точно как в Python', 'const retrieve = traceable(', ' async function retrieve(query: string) {', ' return vectorStore.similaritySearch(query, 4);', ' },', ' { name: "retrieve_docs", runType: "retriever" }', ');', '', '// run_on_dataset для eval -- тоже есть', 'await client.runOnDataset(', ' "rag-qa-eval-v1", target,', ' { evaluators: [answerMatch] }', ');', ].join('\n'), }); // Right pros/cons panel ds.helpers.addProsCons(slide, pres, theme, { x: 6.2, y: 1.45, w: 3.3, h: 3.1, pros: [ 'Auto-tracing из коробки', 'Eval = CI/CD для промптов', 'Platform = deploy за минуты', 'Self-hosted опция', ], cons: [ 'LangSmith SDK 0.x', 'Cloud растет в цене', 'Self-hosted требует K8s', ], }); ds.helpers.addSourceLine(slide, pres, theme, { source: 'github.com/langchain-ai/langsmith-sdk + langgraph-sdk README', }); ds.helpers.addPageNumber(slide, pres, theme, 12); } module.exports = { createSlide };