Full name: projects.locations.tuningJobs.optimizePrompt
Optimizes a prompt.
Endpoint
posthttps://aiplatform.googleapis.com/v1beta1/{parent}/tuningJobs:optimizePrompt
Path parameters
parentstring
Required. The resource name of the Location to optimize the prompt in. Format: projects/{project}/locations/{location}
Request body
The request body contains data with the following structure:
Required. The content to optimize.
Optional. The target model to optimize the prompt for.
Response body
Response message for GenAiTuningService.OptimizePrompt
If successful, the response body contains data with the following structure:
Output only. The optimized prompt content.
| JSON representation |
|---|
{
"content": {
object ( |
OptimizationTarget
The target model to optimize the prompt for.
| Enums | |
|---|---|
OPTIMIZATION_TARGET_UNSPECIFIED |
Unspecified optimization target. Default to OPTIMIZATION_TARGET_GENERAL. |
OPTIMIZATION_TARGET_GENERAL |
Optimize the prompt for quality. |
OPTIMIZATION_TARGET_GEMINI_NANO |
Optimize the prompt for Gemini Nano. |