Skip to content

Commit

Permalink
Merge pull request #60 from intelligentnode/support-env-key
Browse files Browse the repository at this point in the history
Support env key
  • Loading branch information
intelligentnode authored Jan 3, 2024
2 parents 10d30b5 + 9daa03a commit d5c33c1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion intelliserver/api/functions/semanticsearch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ router.post('/search', async (req, res, next) => {
*/
router.post('/search_intellinode', async (req, res, next) => {

const oneKey = req.body.one_key;
const oneKey = req.body.one_key || process.env.ONE_KEY;
const queryText = req.body.query_text;
const searchK = req.body.k;

Expand Down
2 changes: 1 addition & 1 deletion intelliserver/api/utils/chatbot_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ChatbotHelpers {
'cohere': process.env.COHERE_API_KEY
};

const one_key = req.body.one_key;
const one_key = req.body.one_key || process.env.ONE_KEY;

if (one_key) {
// if the api connected with data.
Expand Down
4 changes: 2 additions & 2 deletions intelliserver/swagger.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const options = {
},
info: {
title: 'IntelliServer APIs',
version: '0.0.1',
description: 'AI model as scalable microservices, enabling evaluation of LLMs and offering end-to-end AI functions such as chatbot, semantic search, image generation and beyond.'
version: '0.1.0',
description: 'IntelliServer is a microservice framework providing a scalable interface to various AI tasks like chatting, semantic search, image generation, OCR, and beyond. It enables easy integration of various Large Models and other AI functionalities. Users can deploy IntelliServer locally or in the cloud and utilize its API to enhance their business applications with cutting-edge AI capabilities. You can use Intellinode cloud to upload your docs and augment the AI models with your data using one key concept.'
},
},
apis: ['./api/**/*.js'],
Expand Down

0 comments on commit d5c33c1

Please sign in to comment.