Create a new version of an existing prompt template. Freeplay assigns a random ID. Use when you have the template ID from a previous API call.
Version Creation Semantics:
A new version is created only if there is no existing version with identical:
If an identical version exists in any of the target environments, that version is reused and its environments are updated to match the requested environments. This ensures you never create duplicate versions with the same configuration.
Environment Deployment:
These checks are performed so that you can safely upload prompt templates without worrying that you will be creating duplicate versions. This is especially useful in development workflows where your prompts are stored in code.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
PlainPromptTemplate(prompt_template_id: uuid.UUID, prompt_template_version_id: uuid.UUID, prompt_template_name: str, version_name: Optional[str], version_description: Optional[str], metadata: server.api_routes.prompt_templates_api_v2.PromptTemplateMetadata, format_version: int, project_id: uuid.UUID, content: list[typing.Union[server.project_sessions.prompt_template_model.ChatMessageWithMediaSlot, server.project_sessions.prompt_template_model.ChatMessage, server.project_sessions.prompt_template_model.HistoryPlaceholder]], tool_schema: Optional[list[shared.common.NormalizedToolSchema]], output_schema: Optional[dict[str, Any]])