feat: solution for 'Повторный экзамен: Граф с рефлексией и доработкой'

This commit is contained in:
2026-06-30 16:42:32 +03:00
parent 57a7f1d12b
commit 9ff9612bbb
5 changed files with 83 additions and 24 deletions
+16 -8
View File
@@ -1,17 +1,25 @@
# LangGraph Project
# LangGraph Reflection & Rewriting Demo
This project demonstrates a minimal setup for using LangGraph with LangChain OpenAI integration.
This project demonstrates a simple LangGraph state machine that includes:
- **Reflection node** logs the current state.
- **Rewriting node** transforms the input string to uppercase.
- **End node** logs the final state.
## Setup
```bash
pip install -r requirements.txt
npm install
npm run build
npm start
```
## Running
The output will show the state at each node and the final transformed result.
```bash
python main.py
```
## Project Structure
The script will import the necessary modules and print a confirmation message.
- `src/langgraph.ts` Defines the state type, node functions, and constructs the graph.
- `src/index.ts` Entry point that runs the graph with an example input.
- `package.json` Project metadata and dependencies.
- `tsconfig.json` TypeScript compiler configuration.
No JavaScript files are present; the entire project is written in TypeScript.