I have a simple prompt with an input field called 'FinalPrompt'. The prompt is simple as well: summarize the visit reports using {!$Input:FinalPrompt}. I have a simple LWC that allows the user to enter their own question that I will pass to the prompt.
In my apex, i have pulled my data that I want to pass to the LLM, I have the user entered question. I created my inputValueMap with the string 'FinalPrompt' and all the user question and data in a string.
I keep getting the error "required input is missing for parameter Input:FinalPrompt". I have verified by doing a preview the input field is called 'FinalPrompt'
Has anyone had success collecting data in apex and building the prompt and passing it back to the LLM to process and get a response?
Any insight or hints would be appreciated.
thanks
Mike
#Salesforce Developer #Developer Forums
Sushil Kumar (UKG) Forum Ambassador
See if this helps - https://medium.com/@sfdcsushil/invoking-einstein-prompt-from-lwc-apex-941d56b7829e. I had done this few months ago, there maybe small syntax change, you can try this and see if it helps.