Skip to content

Commit 156f422

Browse files
committed
init files updates
1 parent 3452ccd commit 156f422

File tree

7 files changed

+32
-2
lines changed

7 files changed

+32
-2
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
11
<img align="center" src="./logo.png">
22

33
consisTent is a full blows testing framework for prompts. The goal of consisTent is to create reproducible tests for LLM based applications regardless of the FM used.
4+
5+
6+
## Installation
7+
8+
```sh
9+
pip install consistent
10+
```
11+
12+
## Concepts
13+
14+
consisTent comes with 2 types of validators (testers)

consisTent/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
from . import cache
22
from . import validators
3+
4+
from validators import *

consisTent/validators/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
from . import base_validator
22
from . import syntactic_validators
33
from . import semantic_validators
4+
from syntactic_validators import *
5+
from semantic_validators import *
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
from . import consistency_validator
2-
from . import openai_validator
2+
from . import labels_validator
3+
4+
from .labels_validator import LabelsValidator
5+
from consistency_validator import ConsistencyValidator

consisTent/validators/semantic_validators/openai_validator.py renamed to consisTent/validators/semantic_validators/labels_validator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from ..base_validator import Validator
88

99

10-
class OpenAIValidator(Validator):
10+
class LabelsValidator(Validator):
1111
def __init__(
1212
self,
1313
openai_key: str,

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ keywords = ["OpenAI", "LLM", "GPT", "Cohere"]
1919
dependencies = [
2020
"chromadb",
2121
"openai",
22+
"js2py",
23+
"jsonschema",
2224
"langchain",
2325
'tomli; python_version < "3.11"',
2426
]

tests/test.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# %%
2+
import consisTent
3+
4+
consisTent.ConsistencyValidator().validate()
5+
consisTent.LabelsValidator().validate()
6+
consisTent.JsonValidator().validate()
7+
consisTent.JsonValidator().validate()
8+
consisTent.YamlValidator().validate()
9+
consisTent.PydanticValidator().validate()
10+
consisTent.PyValidator().validate()

0 commit comments

Comments
 (0)