-
Notifications
You must be signed in to change notification settings - Fork 151
feature/FIRE 779 get the api key from env #46
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
Merged
+20
−18
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
37943f0
rename rogue
drorIvry 48e851b
Merge branch 'main' of https://github.com/qualifire-dev/rogue-private
drorIvry 17c733f
use env if env var is present
drorIvry df9708a
get api key from env var
drorIvry d7c4ef7
Merge branch 'main' into feature/FIRE-779-get-the-api-key-from-env
drorIvry File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,7 +96,7 @@ async def run_scenarios( | |
| evaluation_results_output_path: Path, | ||
| business_context: str, | ||
| deep_test_mode: bool, | ||
| ) -> EvaluationResults | None: | ||
| ) -> tuple[EvaluationResults | None, str | None]: | ||
| evaluated_agent_auth_credentials = ( | ||
| evaluated_agent_auth_credentials_secret.get_secret_value() | ||
| if evaluated_agent_auth_credentials_secret | ||
|
|
@@ -134,7 +134,7 @@ async def _run_scenarios_with_sdk( | |
| evaluation_results_output_path: Path, | ||
| business_context: str, | ||
| deep_test_mode: bool, | ||
| ) -> EvaluationResults | None: | ||
| ) -> tuple[EvaluationResults | None, str | None]: | ||
| """Run scenarios using the new SDK.""" | ||
|
|
||
| # Initialize SDK | ||
|
|
@@ -173,10 +173,10 @@ async def _run_scenarios_with_sdk( | |
| results.model_dump_json(indent=2, exclude_none=True), | ||
| encoding="utf-8", | ||
| ) | ||
| return results | ||
| return results, final_job.job_id | ||
| else: | ||
| logger.error("Scenario evaluation completed but no results found.") | ||
| return None | ||
| return None, None | ||
|
|
||
| finally: | ||
| await sdk.close() | ||
|
|
@@ -187,6 +187,7 @@ async def create_report( | |
| judge_llm: str, | ||
| results: EvaluationResults, | ||
| output_report_file: Path, | ||
| job_id: str | None = None, | ||
| judge_llm_api_key_secret: SecretStr | None = None, | ||
| qualifire_api_key_secret: SecretStr | None = None, | ||
| deep_test_mode: bool = False, | ||
|
|
@@ -216,6 +217,7 @@ async def create_report( | |
| model=judge_llm, | ||
| api_key=judge_llm_api_key, | ||
| qualifire_api_key=qualifire_api_key, | ||
| job_id=job_id, | ||
| deep_test=deep_test_mode, | ||
| judge_model=judge_model, | ||
| ) | ||
|
|
@@ -342,7 +344,7 @@ async def run_cli(args: Namespace) -> int: | |
| "scenarios_length": len(scenarios.scenarios), | ||
| }, | ||
| ) | ||
| results = await run_scenarios( | ||
| results, job_id = await run_scenarios( | ||
| rogue_server_url=args.rogue_server_url, | ||
| evaluated_agent_url=cli_input.evaluated_agent_url.encoded_string(), | ||
| evaluated_agent_auth_type=cli_input.evaluated_agent_auth_type, | ||
|
|
@@ -364,6 +366,7 @@ async def run_cli(args: Namespace) -> int: | |
| rogue_server_url=args.rogue_server_url, | ||
| judge_llm=cli_input.judge_llm, | ||
| results=results, | ||
| job_id=job_id, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| output_report_file=cli_input.output_report_file, | ||
| judge_llm_api_key_secret=cli_input.judge_llm_api_key, | ||
| deep_test_mode=cli_input.deep_test_mode, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Fix tool doc/signature mismatch for _log_evaluation (scenario_type).
The tool doc omits
scenario_type, but the function requires it. This will cause tool-call validation failures. Either document the param as optional or make it optional in code.Apply this doc tweak:
And make the code accept it as optional (outside this hunk):
🤖 Prompt for AI Agents