PROD_Generic_FUNC - string parsing

This function does two things:

  1. Check for a citation in the assistant answer (has_citation = true)
  2. Creates a "clean" version of the user question and assistant answer, to be used by an analysis script. This is because we don't want extra stuff (like button text or emojis) confusing the analysis LLM
  • Strip emojis
  • Truncate all buttons/suggested follow ups
  • Truncate all citations
Loading...
Variables

  user_msg

string

  assistant_msg_local

string

  user_msg_local

string

  assistant_msg

string

  web_url

string

System provided

  clean_user_local

string

System provided

  clean_user_en

string

System provided

  response

string

System provided

  clean_assistant_local

string

System provided

  has_citation

string

System provided

  request

object

System provided

Loading...
Secrets

Run cost = 1 credits

Functions are free if called from another workflow.

With each run, you agree to Gooey.AI's terms & privacy policy.

Return value

{4 Items
"has_citation"
:
bool
true
"clean_user_en"
:
string
"️ What are the pests that infect tomatoes?"
"clean_user_local"
:
string
"️ Kodi ndi tizilombo totani tomwe timayambitsa phw"
"clean_assistant_local"
:
string
"Ndilibe chidziwitso chovomerezeka kuchokera kwa ma"
}