Update README.md

This commit is contained in:
2026-06-02 11:17:28 +00:00
parent 2e263322af
commit 41c1e4ca45
+20 -19
View File
@@ -1,32 +1,33 @@
# LangGraph Agent with Conversation Memory and User Confirmation # Agent CLI Tool
## Installation
## Установка
```bash ```bash
python -m venv .venv 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 pip install -r requirements.txt
``` ```
## Environment Variables ## Конфигурация
Для работы с локальной моделью (Ollama, LM Studio) укажите переменные окружения:
The agent uses the default OpenAI endpoint via `langchain`. If you want to override, set: ```
export OPENAI_API_KEY=ollama
- `OPENAI_API_KEY` your OpenAI API key. export OPENAI_BASE_URL=http://localhost:11434/v1
- `OPENAI_BASE_URL` custom base URL (e.g., for local Ollama). ```
Если используете удалённый API, поменяйте `base_url` и `api_key` в `agent.py`.
## Running the Agent
## Запуск
```bash ```bash
python agent.py 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. Добро пожаловать! Введите 'exit' для выхода.
3. Prompt you to confirm each tool call via Rich console output.
4. Continue execution after confirmation.
## 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. ---
```