from patronus.prompts import Prompt, push_promptprompt = Prompt( name="support/troubleshooting/login-issues", body="You are a support specialist for {product_name}. Solve this issue: {issue_description}", description="Support prompt for login issues", metadata={ "temperature": 0.7, "max_tokens": 500, "tone": "helpful" })loaded_prompt = push_prompt(prompt)
Use textwrap.dedent for readable multi-line prompts:
import textwrapfrom patronus.prompts import Prompt, push_promptprompt = Prompt( name="content/blog/technical-writer", body=textwrap.dedent(""" You are a technical writer for {company_name}. Topic: {topic} Audience: {audience_level} Tone: {tone} Write a {word_count}-word blog post that: 1. Introduces the topic clearly 2. Provides practical examples 3. Concludes with actionable takeaways Use clear, concise language appropriate for {audience_level} readers. """), description="Technical blog post writer")loaded_prompt = push_prompt(prompt)
# System prompt for support chat"support/troubleshooting/diagnostic-questions/system"# User message template"support/chat/user-query/user"# Few-shot examples for code generation"dev/code-generation/python-function/few-shot"# Instruction prompt for content writing"marketing/email-campaigns/follow-up-template/instruction"