# responders.py
from openai import OpenAI
client = OpenAI()

def generic_pm_reply(user_text: str) -> str:
    """A short, helpful reply from the general model (no RAG)."""
    sys = ("You are a helpful assistant. Be concise, actionable, and neutral. "
           "If the question is outside PM, still answer helpfully but briefly.")
    resp = client.chat.completions.create(
        model="gpt-4o-mini",
        temperature=0.4,
        messages=[
            {"role":"system","content": sys},
            {"role":"user","content": user_text.strip()}
        ],
        max_tokens=600,
    )
    return (resp.choices[0].message.content or "").strip()