https://retellai.com/?utm_source=discord&utm_medium=seo logo
<@1145576664366055464> Where custom function retur...
# ❓・ai-evy-support
s
@AI Evy Where custom function return values are stored How to access returned data in subsequent parts of the conversation Whether returned values become available as variables
a
Thanks for tagging me @swek94. I'll look through relevant sources and get back to you shortly.
### Answer [(1) ]() , [(2) ]() , [(3) ]() , [(4) ]() , [(5) ]() , [(6) ]() , [(7) ]() , [(8) ]() , [(9) ]() Where custom function return values are stored: Custom function return values are processed and converted to string format before being sent to the LLM for further processing [(4) ]() [(6) ]() . The function result is capped at 15000 characters to prevent overloading the LLM context window [(4) ]() , or 4000 characters in some configurations [(1) ]() . How to access returned data in subsequent parts of the conversation: Based on community discussions, the first function call result should end up in the LLM context and be available for subsequent interactions [(8) ]() . To verify the data is accessible, you ca
n ask the agent to read the return value to confirm it's in the context . Whether returned values become available as variables: The documentation shows that you can use returned data as dynamic variables with the format
"{{variable_name}}"
[(7) ]() . However, if the agent isn't automatically reading out the results, you may need to explicitly prompt it to use the returned data . Response format requirements: Your custom function response should have a status code between 200-299 to indicate success [(4) ]() [(6) ]() . The response can be in various formats including string, buffer, JSON object, or blob - all of which will be converted to string before sending to the LLM .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.