-
Notifications
You must be signed in to change notification settings - Fork 21
Akshaya/mocking improvements #656
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
Conversation
c31d415 to
fb0ca4d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements mocking improvements by standardizing error handling, adding model selection capabilities, and preparing for example call usage in LLM mocking. The changes introduce custom exception types to replace generic NotImplementedError exceptions and add support for configurable model parameters and example calls in the mocking framework.
- Standardized error handling with custom UiPath exception types for mocking scenarios
- Added model parameter configuration support for LLM mocking with temperature, top_p, top_k, etc.
- Introduced example call functionality to provide context for LLM-based mocking
Reviewed Changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/uipath/_cli/_evals/mocks/mocker.py | Defines new exception types for mocking error scenarios |
| src/uipath/_cli/_evals/mocks/mocks.py | Updates exception handling and adds example call support to mockable decorator |
| src/uipath/_cli/_evals/mocks/mockito_mocker.py | Implements proper error handling with new exception types |
| src/uipath/_cli/_evals/mocks/llm_mocker.py | Adds model parameter support and example call integration |
| src/uipath/_cli/_evals/_models/_evaluation_set.py | Adds ModelSettings for configurable LLM parameters |
| src/uipath/_services/llm_gateway_service.py | Adds top_k parameter support to chat completions |
| src/uipath/agent/models/agent.py | Introduces BaseResourceProperties with example calls |
| tests/cli/eval/mocks/test_mocks.py | Updates tests to use new exception types |
| samples/calculator/main.py | Demonstrates example call usage in mockable decorator |
| samples/calculator/evals/eval-sets/default.json | Shows model configuration in evaluation set |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
fb0ca4d to
2dc9e0a
Compare
2dc9e0a to
47c0b3c
Compare
47c0b3c to
2b3f61e
Compare
2b3f61e to
da60163
Compare
1. Standardization of errors 1. `UiPathMockResponseGenerationError` to represent errors during generation of mocked response. 2. `UiPathNoMockFoundError` to represent that the method should not be mocked. 2. Model selection 3. Allow run examples in LLM Mocker. # Conflicts: # pyproject.toml
da60163 to
ff2c05d
Compare
UiPathMockResponseGenerationErrorto represent errors during generation of mocked response.UiPathNoMockFoundErrorto represent that the method should not be mocked.Development Package