@aj-archipelago/cortex
Version:
Cortex is a GraphQL API for AI. It provides a simple, extensible interface for using AI services from OpenAI, Azure and others.
20 lines (18 loc) • 620 B
JavaScript
// sys_get_entities.js
// Pathway to get list of available entities with their tools
import { getAvailableEntities } from './tools/shared/sys_entity_tools.js';
export default {
prompt: [],
inputParameters: {},
model: 'oai-gpt41-mini',
executePathway: async ({ args }) => {
try {
const entities = getAvailableEntities();
return JSON.stringify(entities);
} catch (error) {
return JSON.stringify(error);
}
},
json: true, // We want JSON output
manageTokenLength: false, // No need to manage token length for this simple operation
};