Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FunctionCallAssert #9 #10

Merged
merged 1 commit into from
Jan 8, 2025
Merged

Conversation

mehrandvd
Copy link
Owner

Add FunctionCallAssertion and update tests and scenarios

This commit introduces a new FunctionCallAssertion class in the skUnit.Scenarios.Parsers.Assertions namespace to validate function calls within a semantic context. The FunctionCallAssertion class implements the IKernelAssertion interface and includes methods to set expected function call text and assert conditions against provided history.

Key changes:

  • Added FunctionCallAssertion class with properties and methods for function call validation.
  • Updated SemanticTestBase.cs to use ChatClientBuilder and add TimePlugin.
  • Added new test methods in ChatClientTests.cs, KernelChatTests.cs, and ParseChatScenarioTests.cs.
  • Removed obsolete files: config.json, skprompt.txt, PocomoPlugin.cs, and skchat.md.
  • Updated various assertion classes to include a history parameter in the Assert method.
  • Added new scenario files: EiffelTallChat.md, GetCurrentTimeChat.md, and GetCurrentTimeChatJson.md.
  • Updated skUnit.Tests.csproj to manage new and removed resources and references.

These changes enhance the functionality and readability of the codebase, improve test coverage, and streamline scenario management.

Add FunctionCallAssertion and update tests and scenarios

This commit introduces a new `FunctionCallAssertion` class in the `skUnit.Scenarios.Parsers.Assertions` namespace to validate function calls within a semantic context. The `FunctionCallAssertion` class implements the `IKernelAssertion` interface and includes methods to set expected function call text and assert conditions against provided history.

Key changes:
- Added `FunctionCallAssertion` class with properties and methods for function call validation.
- Updated `SemanticTestBase.cs` to use `ChatClientBuilder` and add `TimePlugin`.
- Added new test methods in `ChatClientTests.cs`, `KernelChatTests.cs`, and `ParseChatScenarioTests.cs`.
- Removed obsolete files: `config.json`, `skprompt.txt`, `PocomoPlugin.cs`, and `skchat.md`.
- Updated various assertion classes to include a `history` parameter in the `Assert` method.
- Added new scenario files: `EiffelTallChat.md`, `GetCurrentTimeChat.md`, and `GetCurrentTimeChatJson.md`.
- Updated `skUnit.Tests.csproj` to manage new and removed resources and references.

These changes enhance the functionality and readability of the codebase, improve test coverage, and streamline scenario management.
@mehrandvd mehrandvd merged commit 308d059 into main Jan 8, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant