From 75298a4b83e3a16e37da140d7ab948e5e7dcd40c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A0=D0=BE=D0=BC?= =?UTF-8?q?=D0=B0=D0=BD=D0=BE=D0=B2?= Date: Tue, 2 Jun 2026 06:14:15 +0000 Subject: [PATCH] Update README.md --- README.md | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a13f7bb..d64a01e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,36 @@ -# task-69b1a07c67bbf488a1177da4 +# LLM Interactive Choose‑Your‑Own‑Adventure Game -текстовая игра на основе llm + interrupt \ No newline at end of file +This repository contains a minimal example of a **human‑in‑the‑loop** interactive story powered by LangGraph and OpenAI. The game works as follows: + +1. The user supplies a *theme*. +2. The LLM generates a short opening scene and three numbered options. +3. The graph pauses (`interrupt`) and the user selects an option via a console menu. +4. The LLM receives the choice and writes a short ending. + +The implementation demonstrates: +- State management with `TypedDict`. +- Interrupts and resuming with `langgraph`. +- Simple parsing of LLM output. +- Console interaction using `questionary`. + +## Requirements + +```bash +pip install -r requirements.txt +``` + +You must have an OpenAI API key available in the environment variable `OPENAI_API_KEY`. + +## Running the Game + +```bash +python game.py +``` + +You will be prompted for a theme. After the LLM generates the scene, you will see a menu of three options. Pick one and the story will continue to an ending. + +## Files + +- `game.py` – Main application. +- `requirements.txt` – Python dependencies. +- `README.md` – This documentation. \ No newline at end of file