When using the Eden chat completion module you can set a fallback provider (like perplexity or openai) in case there is error with the primary one.
Today i ran this module a few times and for some reason the Anthropic primary model gave an error:
So the value of generated_text was not there, was empty/null
So if you use:
{{127.result.generated_text}}
it will return an error, instead of getting the generated_text value from the fallback provider, which is object 2 in the result array.
So to get the value in case the primary fails im using something like this:
{{trim(ifempty(get(126.result; “1.generated_text”); get(126.result; “2.generated_text”)))}}
Posting in case it helps others or im doing this wrong.
