From c44140f9c25962bfd2cbf22c8d531b995ce5524e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=B4=D0=B5=D0=BB=D0=B8=D0=BD=D0=B0=20=D0=A1=D0=B0?= =?UTF-8?q?=D1=82=D1=82=D0=B0=D1=80=D0=BE=D0=B2=D0=B0?= Date: Sat, 30 May 2026 17:19:00 +0000 Subject: [PATCH] Create README --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..c371337 --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +# Exam: Structured Output with Pydantic + +This repository contains a small CLI tool that demonstrates how to extract structured data from raw text using LangChain and Pydantic. + +## Features +- Two Pydantic models: `PersonInfo` and `MeetingNotes`. +- Automatic schema selection based on input type. +- One‑shot extraction via LangChain’s `PydanticOutputParser`. +- Simple command line interface with example texts. + +## Usage +```bash +python -m cli --text "Анна, 28 лет, Python-разработчик. Навыки: FastAPI, Docker." +``` +or +```bash +python -m cli --text "Встреча 2026-05-30: Участники: А., Б.; Темы: проект X; Решения: продлить срок." +``` + +## Requirements +- Python 3.10+ +- `langchain-core`, `langchain-openai` (or `langchain-ollama`) and `pydantic`. + +```bash +pip install -r requirements.txt +```