HELP! retrieving contacts from Qdrant database

Good day all,

I hope all is well. Can you please help with this issue? I’ve been trying to replicate an agents that uses OpenAI and Conebase and replace all the services with open source, so I used Ollama and Qdrant. and I have issues retrieving contacts from the database… the error is
" Non string tool message content is not supported"

The agents have no problem sending emails if you write it down, but if you ask by name to get the contact from the database I will get the above error, I tried to filter the output which is this:

[
{
“response”: [
{
“type”: “text”,
“text”: “{"pageContent":"name,email_address: Sara Smith ,[email protected]"}”
}
]
}
]

It’s been 2 days now lol please help.

Share the output returned by the last node

Information on your n8n setup

  • **n8n version:Self hosted
  • **Database (Qdrant)
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, ):
  • Operating system: Linux Server

In every tool that you use $fromAI you can also explicitly declare the type of the variable.

See documentation here

So if you’re having issues with the AI using the wrong type, you can declare the variables as strings.

To do that you can simply add “string” at the en of these functions:

Like this:
{{ $fromAI('email_address', 'The recipient email address', 'string') }}
{{ $fromAI('email_subject', 'The email subject line', 'string') }}
{{ $fromAI('email_body', 'The email body', 'string') }}

It’s good practice to always declare the type of variable.
Try to find other places where you use $fromAI and declare the type.

:muscle: If my reply answers your question, please remember to mark it as a solution.

1 Like

Thank you so much for you help and time mate.

1 Like