randydev commited on
Commit
0cbe030
·
verified ·
1 Parent(s): 9d6ddb4

Update plugins/gptold.js

Browse files
Files changed (1) hide show
  1. plugins/gptold.js +5 -1
plugins/gptold.js CHANGED
@@ -31,7 +31,11 @@ const GptRoutes = express.Router();
31
  GptRoutes.post('/api/v1/ai/cohere/command-plus', authenticateApiKey, apiLimiter, async (req, res) => {
32
  try {
33
  const query = req.query.query;
34
- const results = await CohereAI(query);
 
 
 
 
35
  res.json({ results });
36
  } catch (error) {
37
  res.status(401).json({ error: error.message });
 
31
  GptRoutes.post('/api/v1/ai/cohere/command-plus', authenticateApiKey, apiLimiter, async (req, res) => {
32
  try {
33
  const query = req.query.query;
34
+ let system_prompt = "Your name is AkenoX AI A kind and friendly AI assistant that answers in\na short and concise answer. Give short step-by-step reasoning if required.\n";
35
+ system_prompt = req.query.system_prompt ? req.query.system_prompt : system_prompt;
36
+ const results = await CohereAI(query, {
37
+ system_prompt: system_prompt
38
+ });
39
  res.json({ results });
40
  } catch (error) {
41
  res.status(401).json({ error: error.message });