hi all, a question on send requests to discourse-ai bot
if I create a message to ai-bot, I can select the “personas” to be “Forum Helper”
and forum helper will respond to my message, as below
so I want to do the same thing via api post call, here is the payload in my script which I just copied from the reverse engineering suggestion
url = f"{DISCOURSE_BASE_URL}/posts"
payload = {
"title": subject,
"raw": message,
"target_recipients": DISCOURSE_BOT_USERNAME,
"archetype": "private_message",
"unlist_topic": "false",
"category": "",
"is_warning": "false",
"typing_duration_msecs": "2600",
"composer_open_duration_msecs": "53220",
"featured_link": "",
"shared_draft": "false",
"draft_key": "private_message_ai",
"meta_data[ai_persona_id]": "-1",
"nested_post": "true"
}
response = requests.post(url, headers=HEADERS, json=payload)
but what I got is a bot trying to search my forum instead of the “Forum Helper”, from below you can see that there is no such “Forum Helper” tag at the right of the gemni user, as below
I tried to go to /admin/plugins/discourse-ai/ai-personas
and only leave “Forum Helper” checked and all rest un-checked, but not helping.
I guess I’m missing some key parameter to indicate I want to message “Forum Helper” of ai bot, not the default one which seems to be searching inside of my forum content?
Thank you!