Forum Academy Marketplace Showcase Pricing Features

Remove - " - characters on input

I am making a sumarizer app but it gets error when there’s a - " - on the input

How do I clean the input text and remove all - " - before processing

@rcdcanlas

Perhaps this will work - here’s what I added to my page:

  1. Text input
  2. Text field for output
    – Set output’s value = text input’s value with a “search & replace” function on it. It searches for " (quotes) and replaces it with nothing.
    – You could run workflows off this in the same way when you send it to your summarize engine/NLP.

Result:

Top is input, buttom is output.

Hope this helps, best of luck with your app!

Adam

P.S. I’m curious what NLP you are using, but only if you want to share. I was looking at the plugin for GPT3 recently but haven’t gotten to trying it out yet.

How do I find that " find and replace"? I cant seem to find it

I am using OpenAI gpt-3, it took months to get accepted

Do you have experience using NLP’s?

@rcdcanlas

Try adding your value then clicking on the “more” prompt to get “:find & replace”:

Nice on getting your key, I’ve heard those are pretty tough to get these days. I don’t really have “experience” in NLP/NLG just curiosity/reading about it. Seems like a great tech to pair with Bubble apps.

Thank you so much it works!

Yeah super awesome tech! I was lucky enough to get one. However, a lot of guidelines were updated that means there a lot of things I am not allowed to do

Yeah, it looks like they are getting pretty careful with it. No misinformation campaigns please!

Best of luck with your app, I’m curious to see hear how it goes. Feel free to send a message if you get stuck or are looking for feedback.

Cheers,
Adam

yeah misinformation campaigns is not possible unless if I want my keys to be revoked of course lol

yeah, I was thinking on how to append new generated text on a previous generation. Do you know how to go about it?

yeah once finish getting feedback would be good

@rcdcanlas

Here’s how you might be able to approach that on the front-end (the same logic might generally apply to saving it to the DB too). I’m assuming this will have to go through the NLP’s API calls first so not sure how all that will work, but if it was purely a frontend/workflow issue…

  1. Make a state to store the text then drive the output from the state’s value.

image

nlp_test = my page name where I arbitrarily added my state.
text = the name of my state

  1. Add a workflow to update the state whenever they click a button. This takes the value of the previous state and :appends the new text. Here’s how I set one up:

append #1 = adds a space between the previous values and the new value.
append #2 = adds the input’s value
find & replace = takes out the quotes

Result

Each time you click add it will add the new text at the end, heres it after I did it 3 times changing the number each time.

image

And after the 4th time:

image

Thank you! I have manage to recreate the app :slight_smile:

Really big help on understanding the :append tool

But what happens with this is I have to put input everytime on the input A
I was thinking if I could just click add button and it will generate more text without any further input

because the AI is able to make text on its own

Hope it make sense

Can I show you the app?

this is what I am trying to achieve

this is what I am doing

image

@rcdcanlas

Hmm, not quite sure on this one, seems like it will just need some trial and error. I might consider something in the workflow on button-press that do something like this:

  1. Takes the existing text and append the new text to add from the API call.
  2. Store that as a state.
  3. Clear the input’s value.
  4. Load the text you stored in the state as the initial value of the input.

Might work?

I managed to make it bud … somehow… but I keep appending the initial input(s)

cant figure out how and I am stuck

can you look at the 44 sec video below?

https://screencast-o-matic.com/watch/cri3f6ViysN

Hope you can help me with this

@rcdcanlas,

Can see the video, but not entirely sure what’s going on. Here are some ideas I might look into:

  1. I’d seen this issue when playing around with the NLG plugin, could be an oddity there? It is possible the prompt isn’t being updated in the calls being made?
  2. If you are using Buble states to store any values maybe check to see if they are being cleared or updated properly, it might be pulling from a non-iterated state’s value?