File size: 1,129 Bytes
5283c17
 
 
4b02a1a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---

license: apache-2.0
---


# AssertAI

A fine-tuned SLM to generate deterministic Python unit test plans in strict JSON. It's designed to act as a test-case planner, rather than a full code generator.

Base model: **Llama3.2**.

### What it does
Given a function signature + docstring/spec, Assert-AI outputs:

- a compact list of 2–5 high-signal unit tests
- each test includes args, kwargs, and either an expected value (expect) or expected exception (error)


### Output format
Assert-AI outputs only this JSON object (no extra keys, no markdown):

```json

{

  "fn": "safe_divide",

  "tests": [

    { "name": "divides_when_nonzero", "args": [19, -3], "kwargs": {"default": 0.0}, "expect": -6.333333333333333 },

    { "name": "returns_default_on_zero", "args": [19, 0.0], "kwargs": {"default": 1.5}, "expect": 1.5 }

  ]

}



```

### Example User Input
```text

Function spec:

def clamp(n: int, lo: int, hi: int) -> int:

  \"\"\"Return n bounded between lo and hi inclusive. Precondition: lo <= hi.\"\"\"

```

### Author

**Author:** Sai Teja Erukude  
**Role:** Developer & Maintainer