Hello All!. I am creating RAG based chat system. I got struck while make differntiating of greeting questions and actual context related questions, To identify better I used function tool calling method, if user asks any gretting related question it should it’s own don’t make database search for this, If the question is related to actual context then only it should make db call and fetch relevant dat. I wanted in integrate openai function call in my project to verify the query is greeting or relevant query, i have used tool_choice as to both "auto " and “required”, but it didn’t work properly, Here my code snippet,
model: model,
temperature: parseFloat(temperature),
max_tokens: parseInt(max_tokens),
tools: tools,
// tool_choice: {
// type: “function”,
// function: {
// name: “performVectorSearch”
// }
// }, // Let the model decide whether to use the tool
tool_choice: “required”, // auto
Why this not work in my case? Any Idea about it.