jorel
Version:
A unified wrapper for working with LLMs from multiple providers, including streams, images, documents & automatic tool use.
22 lines (21 loc) • 545 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.toolChoiceToGroq = void 0;
const toolChoiceToGroq = (toolChoice) => {
if (!toolChoice) {
return "none";
}
if (toolChoice === "auto") {
return "auto";
}
else if (toolChoice === "required") {
return "required";
}
else if (toolChoice === "none") {
return "none";
}
else {
return { type: "function", function: { name: toolChoice } };
}
};
exports.toolChoiceToGroq = toolChoiceToGroq;