#Hidden Prompts, Context (and others) to Users
1 messages ยท Page 1 of 1 (latest)
Please have a look to this: https://meowapps.com/ai-engine/faq/#query-and-answers. The answer is in "Can I make the context secret, or private, or modify it dynamically on the server-side?".
hello please how do you get those strings?
can I get them using code inspector of my browser?
ok @tame citrus ๐ can you tell me which tab of the code inspector? i dont find it (i'm still noob with browser code inspector) ๐
Two ways.
-
Switch to the Sources tab and look for the JS injected by AI Engine
-
Switch to the Network tab, reload the page, initiate a chat, and look for chat payload (Available in Fetch/XHR section)
Great thank you so much @magic crown! A bit hidden for a noob like me. Many thanks !!
Thanks to that tool, I can see the code snippet is not working ๐ can anyone help me fix this?
I use the UI to setup the context.
I use this code snippet to hide the context.
Not working ๐ข
Maybe adding the chat ID somewhere?
Hello @magic crown , @severe elbow Any idea how I can hide my prompt? this code snippet is not working to hide the chatwide popup chat, I can still see the query in clear in the network tab ๐ข
Hidden Prompts, Context (and others) to Users
I can't get the secret prompt working too.
Hi, wouldn't it be better the context to be kept on the server side and in the builder the context to be referred only. In such a case the context would not be visible in the page's source code and we would be able to create as many different contexts as needed and refer to a particular context in the different chatbots.
I got it, thanks!
Can you share how? ๐
@ebon jungle is it working for you? it'nos working for me :/ (see above screenshots)
this should be great... or an option in UI to enforce the confidentiality of the framing prompt @severe elbow
Hi, the context should be specified in the filter, and in the context field of the Bot builder should be put only the placeholder {SECRET_PROMPT} + some more context parameters if needed (the additional context parameters in the context filed are visible in the page's source and in the request).
The question is how we could have more than one secret context.
Hey - Doesn't work for me neither. Still have the context after updated the php files with Secret Prompt. Any update or help here ?
@tame citrus - What did you modify exactly to make it work plz ?
@ebon jungle Same plz ?
@severe elbow maybe ?
I'm on a Pro version - changed either the normal module & pro module phh file - adding the line of code needed
Hi,
Put the hidden context into the filter:
add_filter( 'mwai_ai_context', function ( $context ) {
$secret_prompt = "HIDDEN CONTEXT HERE";
return str_replace( '{SECRET_PROMPT}', $secret_prompt, $context );
}, 10, 1 );
The shortcode should be as follows:
[mwai_chat context="{SECRET_PROMPT}" start_sentence="Hi! How can I help you?" text_input_placeholder="Type your message...!"]
Hey @ebon jungle - thx for the reply.
I may have missed something but in which file do you place the hidden context ? function.php or ai-engine.php or somewhere else ? I couldn't either find the answer on FAQ. Thx for taking the time here
Otherwise, just wait for the new version that will come very soon, probably this week-end... everything will be "hidden" ๐