https://promptfoo.dev/ logo
Assistant Function Call with submitOutputTool
# ❓|questions
q
Hi im currently working on an test case using an Assistant from OpenAI. So there is an problem, i need to submit the tools to the function to get an response. I found nothing related to that in the docs, so im asking here is there a wait to wait for the status of the assistant run and than submit the output.
i
Just to make sure I understand, you mean that you need to submit the results of a tool call in order to continue the assistant flow?
q
Yes
i
Oh got it
it will be included in the next release!
q
When is the release going live?
i
Just published in release 0.42.0
q
Are the docs for it also live ?
Thanks 😁. Also Thanks for the quick answers
i
yes, these should be updated now:
q
Hi i get an error everytime i call an assistant.
fixed it
🙂
but one last question is there a way to map through an arry like
Copy code
{{#each user}}
   {{name}}: {{id}}
{{/each}}
in the prompts
`module.exports.loadPrompt = async function ({vars}) { return [ { role: 'user', content:`List of available users:\n${vars.users.map(user =>
${user.name}: ${user.id}
).join('\n')}Today is the ${vars.today}, ${vars.input}` }, ]; };` because This is not working
List of available users: {% for user in users %} {{ user.name }}: {{ user.id }} {% endfor %} Today is the {{today}}. """{{input}}""" I have tried this but it does not work either. 😦
i
{% for user in users %}
looks correct because it's a nunjucks template: