Add README.md
This commit is contained in:
@@ -1,59 +1 @@
|
|||||||
# Task Card Processor
|
<content>
|
||||||
|
|
||||||
This project extracts a structured task card from a raw user text using a single LLM call and a Pydantic parser.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Create a virtual environment (recommended)
|
|
||||||
python -m venv .venv
|
|
||||||
source .venv/bin/activate # On Windows use .venv\Scripts\activate
|
|
||||||
|
|
||||||
# Install dependencies
|
|
||||||
pip install -r requirements.txt
|
|
||||||
```
|
|
||||||
|
|
||||||
## Configuration
|
|
||||||
|
|
||||||
The script uses OpenAI API. Set the following environment variables before running:
|
|
||||||
|
|
||||||
- `OPENAI_API_KEY` – your OpenAI API key.
|
|
||||||
- `OPENAI_API_BASE` (optional) – override the default OpenAI base URL if you use a local LLM.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
You can pipe raw text into the script or provide it as a command‑line argument.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# From stdin
|
|
||||||
cat raw_text.txt | python agent.py
|
|
||||||
|
|
||||||
# As an argument
|
|
||||||
python agent.py "Generate a task card for a math homework assignment."
|
|
||||||
```
|
|
||||||
|
|
||||||
The script prints a validated JSON object followed by a short summary.
|
|
||||||
|
|
||||||
## Example Output
|
|
||||||
|
|
||||||
```json
|
|
||||||
--- Task Card JSON ---
|
|
||||||
{
|
|
||||||
"title": "Math Homework",
|
|
||||||
"subject": "Algebra",
|
|
||||||
"deadline_hint": "Next Friday",
|
|
||||||
"deliverable_type": "Problem set",
|
|
||||||
"grading_hints": "Include solutions and explanations"
|
|
||||||
}
|
|
||||||
|
|
||||||
--- Summary ---
|
|
||||||
Title: Math Homework
|
|
||||||
Subject: Algebra
|
|
||||||
Deadline: Next Friday
|
|
||||||
Deliverable: Problem set
|
|
||||||
Grading hints: Include solutions and explanations
|
|
||||||
```
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
MIT License.
|
|
||||||
Reference in New Issue
Block a user