#Hidden Prompts, Context (and others) to Users

1 messages ยท Page 1 of 1 (latest)

autumn karma
#

I am curious if API key is shown anywhere there too?

severe elbow
tame pulsar
#

hello please how do you get those strings?

#

can I get them using code inspector of my browser?

tame pulsar
#

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) ๐Ÿ™

magic crown
tame pulsar
#

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?

tame pulsar
#

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 ๐Ÿ˜ข

severe elbow
#

Hidden Prompts, Context (and others) to Users

ebon jungle
#

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.

ebon jungle
#

I got it, thanks!

fossil mulch
tame pulsar
#

@ebon jungle is it working for you? it'nos working for me :/ (see above screenshots)

tame pulsar
ebon jungle
#

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.

hoary current
#

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

ebon jungle
#

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...!"]

hoary current
#

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

severe elbow
#

Otherwise, just wait for the new version that will come very soon, probably this week-end... everything will be "hidden" ๐Ÿ™‚