mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
23 lines
664 B
JavaScript
23 lines
664 B
JavaScript
|
|
const express = require('express');
|
||
|
|
const { getAvailableTools } = require('~/server/controllers/PluginController');
|
||
|
|
const { verifyToolAuth } = require('~/server/controllers/tools');
|
||
|
|
|
||
|
|
const router = express.Router();
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Get a list of available tools for agents.
|
||
|
|
* @route GET /agents/tools
|
||
|
|
* @returns {TPlugin[]} 200 - application/json
|
||
|
|
*/
|
||
|
|
router.get('/', getAvailableTools);
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Verify authentication for a specific tool
|
||
|
|
* @route GET /agents/tools/:toolId/auth
|
||
|
|
* @param {string} toolId - The ID of the tool to verify
|
||
|
|
* @returns {{ authenticated?: boolean; message?: string }}
|
||
|
|
*/
|
||
|
|
router.get('/:toolId/auth', verifyToolAuth);
|
||
|
|
|
||
|
|
module.exports = router;
|