If Else - OpenAI column

Hey guys,

Is it possible to only run computed columns based on an if else statement.

I only want to run a voice to text & summarise column if a certain option is selected

Example : If “teacher” is selected , run the “teacher summary” column but not the default summarise column

In the screenshot below , you can see interview is selected by the user but the teacher columns still run


t

You could make the result of an IF column be the source value used in your ai column. If the IF column returns a blank, then I assume the AI column wouldn’t do anything because you would be feeding it a blank.

1 Like

Sorry , my brain is not firing on all cylinders today…how would an example of that look like using the columns I have in the screenshot

Assuming that the Teacher columns refer to the URL column, then something like this:

  • If Summary Style is Teacher, then URL column

And then point those last two columns at the if-then-else column instead of the URL column.

Currently I have Summary Teacher | Message - UL_Speech_To_Text | & Summary_Work | Message - Summary-Teacher |

Both OpenAI - Send chat to GPT without history

Summary Style is a choice component column

So did I get it wrong?

This just populates the link to recording in the IF column

Yes, that’s the idea. But only when the correct condition is met. If not, it will return nothing, and so the AI column/s won’t do anything.

2 Likes

So it populates the summary columns first now instead but then UL columns follow , rather than the other way around

All 4 still populate

yeah, I don’t really understand what each of your columns does - I’m just guessing from what you’ve shown.

But do you understand the concept?
That is - the if-then-else column serves as a replacement for the URL column.

How many different values can you have in the Summary Style column?
Two?
You might need two if-then-else columns - one to cover each case.

Sorry, but I’m guessing here. It would be really helpful if you could explain what each of those columns shown in your screen shot does, and which ones refer to which other ones.

1 Like
  • UL_Link to Recording = URL for audio recorder
  • UL SpeechToText = convert from URL
  • UL Summary = summarise UL_SpeechToText

Summary Style = Choice component

  • Summary_Teacher = Summarise UL_SpeechToText (ChatGPT no history)
  • Summary_Work = Summarise Summary_Teacher (ChatGPT no history)

Great!
That really really helps.

Okay, so… tell me if this is correct:

  • The UL Summary column should always run, no matter what the Summary Style column value is
  • The Summary_Teacher column should only run if the Summary Style is “teacher”
  • The Summary_Work column should only run if the Summary Style is “interview”

Is that correct?

UL_SpeechToText should always run as this is the start point from the audio recording

If Summary Style is Teacher then Summary_Teacher & Summary_Work should run but not UL_Summary as its not needed.

Interview would be another choice than teacher , so would need another IF column as you said before.

I just don’t want to have to run the OpenAI call for every column every time , but rather the matching Style column ie Teacher style only runs Summary_Teacher & Summary_Teacher_Work

yep, understood.

Just one more question, sorry:

What about if Summary Style is Interview, should all 3 columns run, or…?

Then it would run 2 other additonal columns instead that would have a different summary style

User records/uploads audio , converted to speech to text , text is used to create a different summary based on their profile chosen ie Interview , Teacher etc

In its current state , every column would create a summary no matter what summary style is chosen , which is not ideal for my OpenAI API charges :smiley:

Hi!
Why you need 2 ai column instead to change AI column parameters by if then else column according style?

1 Like

Each AI column has a different prompt

ok, but nether else you can to bypass (by if )ai parameters to force stop ai works

1 Like