How to activate function call via prompt?

I’m using this structure and putting it in the prompt

{ACTION: activa_atendimento_humano}

but it’s not working

either. I configured the tool with name and description but it’s not working

Functions are used when there is a need in order to answer the user’s question. They are typically used for getting knowledge or taking real world action on behalf of the user.

A chatbot not being a chatbot will take high-quality rules about the need for the function right in the main function description itself.

It doesn’t take any special trigger. The AI decides when they are useful.

1 Like

This is the problem, I configure the tool and even tried to configure the prompt but the tool does not always activate

Again, there should be no “configure the prompt” as an API developer allowing user input such as “Go away bot, connect me to a real person.” or “I’m gonna cancel my subscription”. Those alone should be matching against a function and its description, which can be long, multi-line, and prescriptive.

If on chat completions, able to use a logit bias, you can increase the chance a bit with “logit_bias”: [{316: 5}] or similar, where 5 is a range -100 to +100, to promote the chance of initial function invocation.

That affects the remaining language a bit also by the silly use of a normal token internally, though. You are blocked from affecting the best special token for increasing the probability of a tool call.

If on the Responses API endpoint, or those technical ideas don’t work out for you, you are stuck trying to make the AI understand with function specification treated as prompt, or paying for an AI model more qualified to determine user intent and application needs, perhaps by a single-purpose input inspection and classification of that input.

I understand, how could I configure a tool to activate when the lead answers 5 questions correctly.

This is my problem

He is a qualified lead, but I can’t do anything that works

Maybe just have a tool or inspector “collect lead info”, and it rings the phone when someone is looking hot by triggering it multiple times…

I understand, but how would the tool configuration be? And what is this inspector like?

It depends on the pattern you are looking for or doing. If you are conducting an interview that needs to be completed after AI demands for information, or just are watching to see

Chatbots are not good replacements for a web form, and I’d rather order my pizza through a website than needing to type.

You’d use an inspector the same way that you’d use moderations on the input or some of the chat, where it runs a prompt “Is this person interested”. A single-purpose AI that is not going to be distracted by doing other jobs.