@hyperbrowser/agent
Version:
Hyperbrowsers Web Agent
20 lines (19 loc) • 667 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStructuredOutputMethod = getStructuredOutputMethod;
/**
* Determines the appropriate structured output method based on the LLM type
* @param llm The language model instance
* @returns The structured output method to use ("functionCalling" or "jsonMode")
*/
function getStructuredOutputMethod(llm) {
const modelName = llm.getName();
if (modelName === "ChatAnthropic") {
return "functionCalling";
}
else if (modelName === "ChatOpenAI") {
return undefined;
}
// Default to functionCalling for other models
return "functionCalling";
}