UNPKG

@n8n/n8n-nodes-langchain

Version:

![Banner image](https://user-images.githubusercontent.com/10284570/173569848-c624317f-42b1-45a6-ab09-f0ea3c247648.png)

18 lines 602 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.modelSearch = modelSearch; const transport_1 = require("../transport"); async function modelSearch(filter) { const response = (await transport_1.apiRequest.call(this, 'GET', '/models')); let models = response.data; if (filter) { models = models.filter((model) => model.id.toLowerCase().includes(filter.toLowerCase())); } return { results: models.map((model) => ({ name: model.id, value: model.id, })), }; } //# sourceMappingURL=listSearch.js.map