@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.
30 lines (24 loc) • 805 B
JavaScript
import { callPathway } from '../../../lib/pathwayTools.js';
export default {
// The main prompt function that takes the input text and asks to generate a summary.
prompt: [],
inputParameters: {
model: "oai-gpt41",
chatHistory: [{role: '', content: []}],
researchMode: false,
agentContext: [
{ contextId: "", contextKey: "", default: true }
]
},
timeout: 600,
executePathway: async ({args, _runAllPrompts, resolver}) => {
// chatHistory is always passed in complete
const response = await callPathway('sys_entity_agent', {
...args,
chatHistory: args.chatHistory || [],
stream: false,
useMemory: false
}, resolver);
return response;
}
}