From 41c1e4ca45d36c82c693869aaa41db1d1f48dc4c Mon Sep 17 00:00:00 2001 From: balabanovan530 <175+balabanovan530@noreply.localhost> Date: Tue, 2 Jun 2026 11:17:28 +0000 Subject: [PATCH] Update README.md --- README.md | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 28f197f..a58d1d5 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,33 @@ -# LangGraph Agent with Conversation Memory and User Confirmation - -## Installation +# Agent CLI Tool +## Установка ```bash python -m venv .venv -source .venv/bin/activate # on Windows use `.venv\Scripts\activate` +source .venv/bin/activate # Windows: .venv\Scripts\activate pip install -r requirements.txt ``` -## Environment Variables - -The agent uses the default OpenAI endpoint via `langchain`. If you want to override, set: - -- `OPENAI_API_KEY` – your OpenAI API key. -- `OPENAI_BASE_URL` – custom base URL (e.g., for local Ollama). - -## Running the Agent +## Конфигурация +Для работы с локальной моделью (Ollama, LM Studio) укажите переменные окружения: +``` +export OPENAI_API_KEY=ollama +export OPENAI_BASE_URL=http://localhost:11434/v1 +``` +Если используете удалённый API, поменяйте `base_url` и `api_key` в `agent.py`. +## Запуск ```bash python agent.py ``` -The script starts with an empty conversation history. The graph will: -1. Retrieve memory (currently just echoes the existing history). -2. Invoke a placeholder agent that would normally process the conversation. -3. Prompt you to confirm each tool call via Rich console output. -4. Continue execution after confirmation. +## Пример +``` +Добро пожаловать! Введите 'exit' для выхода. -## Extending +Вы: Какая погода в Казани сегодня? +Tool call detected: get_price{'city': 'Казань', 'date': 'сегодня'} +Разрешить? (Y/n): y +Цена в Казань на сегодня: 1000₽ -Replace `agent_node` with real LangChain logic, add tools, and integrate an actual LLM model as needed. \ No newline at end of file +--- +```