Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/mehrandvd/skunit
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrandvd committed Dec 28, 2023
2 parents 8167065 + a8e4c7c commit 6c02084
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ The two texts are not semantically equivalent. The first text expresses anger, w
> As demonstrated, when a `SemanticSimilar` check fails, it provides a semantic explanation for the failure. This feature proves to be incredibly useful during debugging.
Here's another example of an executing The [Chatting about Eiffel height](https://github.com/mehrandvd/skunit/blob/main/src/skUnit.Tests/SemanticKernelTests/ChatScenarioTests/Samples/EiffelTallChat/skchat.md) test:
![image](https://github.com/mehrandvd/skunit/assets/5070766/37cf7232-e187-41dc-827d-d9630ce86c71)

![image](https://github.com/mehrandvd/skunit/assets/5070766/56bc08fe-0955-4ed4-9b4c-5d4ff416b3d3)

## Requirements
- .NET 7.0 or higher
Expand Down
13 changes: 7 additions & 6 deletions docs/chat-scenario-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Yes, the Eiffel Tower in Paris, France, is tall at 330 meters (1,083 feet) in he

### CHECK Condition
Confirms that the Eiffel Tower is tall or expresses positivity.
OK
OK

## [USER]
What about Everest Mountain?
Expand All @@ -147,7 +147,7 @@ Yes, Mount Everest is the tallest mountain in the world, with a peak that reache

### CHECK Condition
The sentence is positive.
OK
OK

## [USER]
What about a mouse?
Expand All @@ -160,7 +160,7 @@ No, a mouse is not tall.

### CHECK Condition
The sentence is negative.
OK
OK

## [USER]
Give me a JSON containing the Eiffel height.
Expand All @@ -183,15 +183,16 @@ Example:
{
"height": ["NotEmpty", ""]
}
OK
OK

### CHECK JsonCheck
{
"height": ["Contain", "meters"]
}
OK
OK
```

This output is generated line by line as the test is executed:

![image](https://github.com/mehrandvd/skunit/assets/5070766/146a26d5-c73c-47f2-aeba-e9e9c6c48dcd)
![image](https://github.com/mehrandvd/skunit/assets/5070766/f3ef8a37-ceab-444f-b6f4-098557b61bfa)

12 changes: 12 additions & 0 deletions docs/check-statements-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,18 @@ This check passes if the output is a valid JSON and:

This check is great for asserting functions that are going to return a specific JSON.

To make your `.md` files more readable, you can annotate your JSON with ` ``` `:

``````md
### CHECK JsonCheck
```json
{
"name": ["Equals", "Mehran"],
"description": ["SemanticCondition", "It mentions that he is a good software architect."]
}
```
``````

## CHECK Empty
It ensures that the answer is empty.
```md
Expand Down

0 comments on commit 6c02084

Please sign in to comment.