To reference existing prompts in GCP Generative AI without sending full prompt contents in each request, save your prompts using the vertexai.preview.prompts.create_version() method and retrieve them with vertexai.preview.prompts.get() in your Python code.
Here is the code snippet you can refer to:

In the above code we are using the following key points:
- Defines a function save_prompt to store prompt data online using create_version(), allowing future access without resending the full content.
- Implements a function get_prompt to retrieve saved prompts by their unique prompt_id using the get() method.
- Demonstrates saving a prompt with specific data and a display name, then retrieving it using its prompt_id.
Hence, by saving prompts online and referencing them via their prompt_id, you can efficiently manage and utilize prompts in GCP Generative AI without sending full prompt contents in each request.