Prompts

fluiq.fetch_prompt() fetches a versioned template from the Prompts dashboard at runtime. Edit and promote prompts without touching your code or triggering a redeploy.

Fetch a deployed prompt template by slug and render it with variables before calling your LLM.

Python
import fluiq
import openai

fluiq.instrument(api_key="fl_...")

client = openai.OpenAI()

# Fetch the production snapshot (default)
prompt = fluiq.fetch_prompt("customer-support-reply")

# Fill template variables and call your LLM
filled = prompt.render(
    company="Acme Corp",
    language="English",
    question=user_input,
)

response = client.chat.completions.create(
    model=prompt.model or "gpt-4o",
    messages=[{"role": "user", "content": filled}],
)
print(response.choices[0].message.content)