forked from GoogleCloudPlatform/python-docs-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(generativeai): update prompt optimizer sample and tests (GoogleCl…
…oudPlatform#12630) Update samples and tests for Prompt Optimizer. The static resources have been moved to GCS buckets and the tests can now be made simpler.
- Loading branch information
1 parent
8c38fa1
commit 50cf5fb
Showing
5 changed files
with
75 additions
and
158 deletions.
There are no files selected for viewing
This file contains 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 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 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 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
8 changes: 4 additions & 4 deletions
8
generative_ai/prompts/test_resources/sample_configuration.json
This file contains 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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"project": "$PROJECT_ID", | ||
"system_instruction_path": "gs://prompt_optimizer_bucket/sample_system_instruction.txt", | ||
"prompt_template_path": "gs://prompt_optimizer_bucket/sample_prompt_template.txt", | ||
"system_instruction_path": "gs://$CLOUD_BUCKET/sample_system_instruction.txt", | ||
"prompt_template_path": "gs://$CLOUD_BUCKET/sample_prompt_template.txt", | ||
"target_model": "gemini-1.5-flash-001", | ||
"eval_metrics_types": ["safety"], | ||
"optimization_mode": "instruction", | ||
"input_data_path": "gs://prompt_optimizer_bucket/sample_prompts.jsonl", | ||
"output_path": "gs://prompt_optimizer_bucket", | ||
"input_data_path": "gs://$CLOUD_BUCKET/sample_prompts.jsonl", | ||
"output_path": "gs://$CLOUD_BUCKET", | ||
"eval_metrics_weights": [1] | ||
} |