From de379922a5fd1f004e8864cd6ceafaa579618749 Mon Sep 17 00:00:00 2001 From: balabanovan530 <175+balabanovan530@noreply.localhost> Date: Tue, 2 Jun 2026 14:56:25 +0000 Subject: [PATCH] Add README.md --- README.md | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..458e865 --- /dev/null +++ b/README.md @@ -0,0 +1,83 @@ +# Text Extractor CLI + +## Overview + +This project provides a command‑line tool that extracts structured data from free‑form text using **LangChain** and **Pydantic**. It supports two schemas: + +1. **PersonInfo** – name, age, profession, skills. +2. **MeetingNotes** – title, date, participants, agenda. + +The tool automatically detects which schema to use based on the input text. + +## Installation + +```bash +# Create a virtual environment +python -m venv .venv +source .venv/bin/activate # On Windows use .venv\Scripts\activate + +# Install dependencies +pip install -r requirements.txt +``` + +## Environment variables + +The tool uses OpenAI’s API. Create a `.env` file in the project root with the following variables: + +``` +OPENAI_API_KEY=your_api_key_here +OPENAI_MODEL=gpt-3.5-turbo # optional, defaults to gpt-3.5-turbo +OPENAI_BASE_URL= # optional, for local LLMs (e.g. http://localhost:11434/v1) +``` + +If you are using a local model (Ollama/LM Studio) provide the `OPENAI_BASE_URL` and set `OPENAI_API_KEY` to any non‑empty string (e.g. `ollama`). + +## Usage + +```bash +# Pass text as a command‑line argument +python agent.py "Anna, 28 years old, Python developer. Skills: FastAPI, Docker." + +# Or pipe text via stdin +cat <