Share feedback, ideas and get community help

Updated 2 months ago

OpenAI function in Assistant does not collect 02 parameters

At a glance

A community member has an OpenAI assistant that triggers a function to collect the customer's name and email. The function has two parameters, "name" and "email", and the community member is using the setVariable('nameClient', name) and setVariable('emailClient', email) commands to set the variables. However, only the emailClient variable is being set correctly, and the community member is seeking help to resolve this issue.

Other community members have commented that they have not been able to successfully use more than one variable when triggering the function, and one community member has managed to reproduce the bug. The issue is being tracked on a GitHub repository, and a fix has been pushed, which will be deployed within 10 minutes.

Useful resources
We have an OpenAI assistant that triggers a function to collect the customer's name and email, here is the function that has two parameters


{
"name": "get_name_email",
"description": "Sends the client name and email for integration.",
"strict": true,
"parameters": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "name of client"
},
"email": {
"type": "string",
"description": "email of client"
}
},
"required": [
"name",
"email"
],
"additionalProperties": false
}
}

When we use the command setVariable('nameClient',name) and setVariable('emailClient',email)

Function Session Code

try {
setVariable('nameClient',name)
setVariable('emailClient',email)
return 'ok'
} catch (error) {
return 'error'
}

But in the result only the emailCliente variable has a value

Could you help us?
a
B
9 comments
I searched a lot in the community and I didn't find people who successfully use more than one variable when triggering the function, according to the example.
@Baptiste If you're having a good day, help us lol
Can you provide a simple reproduction?
Lets resume
We have an OpenAI assistant that triggers a function to collect the customer's name and email, here is the function that has two parameters


{
"name": "get_name_email",
"description": "Sends the client name and email for integration.",
"strict": true,
"parameters": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "name of client"
},
"email": {
"type": "string",
"description": "email of client"
}
},
"required": [
"name",
"email"
],
"additionalProperties": false
}
}

When we use the command setVariable('nameClient',name) and setVariable('emailClient',email)

Function Session Code

try {
setVariable('nameClient',name)
setVariable('emailClient',email)
return 'ok'
} catch (error) {
return 'error'
}
Managed to reproduce the bug
Alright I just pushed a fix
It will deployed in max 10 min
thanks for the report!
Add a reply
Sign up and join the conversation on Discord