{"id":13570060,"url":"https://github.com/intelligentnode/IntelliNode","last_synced_at":"2025-04-04T06:31:45.033Z","repository":{"id":154147129,"uuid":"628776431","full_name":"intelligentnode/IntelliNode","owner":"intelligentnode","description":"Access the latest AI models like ChatGPT, LLaMA, Diffusion, Gemini Hugging face, and beyond through a unified prompt layer and performance evaluation","archived":false,"fork":false,"pushed_at":"2024-03-11T20:02:03.000Z","size":8415,"stargazers_count":200,"open_issues_count":7,"forks_count":13,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-05-22T06:10:59.853Z","etag":null,"topics":["anthropic","chatbot","chatgpt","claude","dall-e","embeddings","gemini","google-ai","gpt-4","hugging-face","image-generation","language-model","mistralai","nodejs","openai","prompt-engineering","semantic-search","speech-synthesis","vectors"],"latest_commit_sha":null,"homepage":"https://show.intellinode.ai","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/intelligentnode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-17T00:39:33.000Z","updated_at":"2024-06-07T19:08:31.815Z","dependencies_parsed_at":null,"dependency_job_id":"93c645f0-beb0-4325-91df-819b249147b2","html_url":"https://github.com/intelligentnode/IntelliNode","commit_stats":null,"previous_names":["barqawiz/intellinode"],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intelligentnode%2FIntelliNode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intelligentnode%2FIntelliNode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intelligentnode%2FIntelliNode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intelligentnode%2FIntelliNode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intelligentnode","download_url":"https://codeload.github.com/intelligentnode/IntelliNode/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247134465,"owners_count":20889399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anthropic","chatbot","chatgpt","claude","dall-e","embeddings","gemini","google-ai","gpt-4","hugging-face","image-generation","language-model","mistralai","nodejs","openai","prompt-engineering","semantic-search","speech-synthesis","vectors"],"created_at":"2024-08-01T14:00:47.804Z","updated_at":"2025-04-04T06:31:40.025Z","avatar_url":"https://github.com/intelligentnode.png","language":"JavaScript","funding_links":[],"categories":["Frameworks","JavaScript"],"sub_categories":[],"readme":"\u003c!-- \u003cp align=\"center\"\u003e\n\u003cimg src=\"images/intellinode_new_header.png\" width=\"400em\"\u003e\n\u003c/p\u003e --\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"images/multimodel-banner.png\" width=\"650em\"\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003e\nUnified prompt, evaluation, and production integration to any large model\n\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n\n\u003ca href=\"https://www.npmjs.com/package/intellinode\" alt=\"npm version\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/intellinode?style=flat-square\" /\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://opensource.org/licenses/Apache-2.0\" alt=\"licenses tag\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/intelligentnode/IntelliNode?style=flat-square\" /\u003e\n\u003c/a\u003e\n\n\n\u003ca href=\"https://discord.gg/VYgCh2p3Ww\" alt=\"Join our Discord community\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Discord-join%20us-5865F2?style=flat-square\u0026logo=discord\u0026logoColor=white\" /\u003e\n\u003c/a\u003e\n\n\u003c/p\u003e\n\n# Intelligent Node\n\nIntelliNode is a javascript module that integrates cutting-edge AI into your project. With its intuitive functions, you can easily feed data to models like **ChatGPT**, **LLaMA**, **WaveNet**, **Gemini** and **Stable diffusion** and receive generated text, speech, or images. It also offers high-level functions such as semantic search, multi-model evaluation, and chatbot capabilities.\n\n# Access the module\n## Install\nOne command and get access to latest models:\n```\nnpm i intellinode\n```\n\nFor detailed usage instructions, refer to the [documentation](https://docs.intellinode.ai/docs/npm).\n\n## Examples\n### Gen\nThe `Gen` function quickly generates tailored content in one line.\u003cbr\u003e\u003cbr\u003e\nimport:\n```js\nconst { Gen } = require('intellinode');\n```\ncall:\n```js\n// one line to generate html page code (openai gpt4 is default)\ntext = 'a registration page with flat modern theme.'\nawait Gen.save_html_page(text, folder, file_name, openaiKey);\n```\n```js\n// or generate blog post (using cohere)\nconst blogPost = await Gen.get_blog_post(prompt, apiKey, provider='cohere');\n```\n\n### Chatbot\nimport:\n```js\nconst { Chatbot, ChatGPTInput } = require('intellinode');\n```\ncall:\n```js\n// set chatGPT system mode and the user message.\nconst input = new ChatGPTInput('You are a helpful assistant.');\ninput.addUserMessage('What is the distance between the Earth and the Moon?');\n\n// get chatGPT responses.\nconst chatbot = new Chatbot(OPENAI_API_KEY, 'openai');\nconst responses = await chatbot.chat(input);\n```\n### Gemini Chatbot\nIntelliNode enable effortless swapping between AI models.\n1. imports:\n```js\nconst { Chatbot, GeminiInput, SupportedChatModels } = require('intellinode');\n```\n2. call:\n```js\nconst input = new GeminiInput();\ninput.addUserMessage('Who painted the Mona Lisa?');\n\nconst geminiBot = new Chatbot(apiKey, SupportedChatModels.GEMINI);\nconst responses = await geminiBot.chat(input);\n```\n\nThe documentation to switch the chatbot provider between ChatGPT, LLama, Cohere, Mistral and more can be found in the [IntelliNode Wiki](https://github.com/Barqawiz/IntelliNode/wiki/ChatBot).\n\n### Semantic search\nimport:\n```js\nconst { SemanticSearch } = require('intellinode');\n```\ncall:\n```js\nconst search = new SemanticSearch(apiKey);\n// pivotItem is the item to search.\nconst results = await search.getTopMatches(pivotItem, searchArray, numberOfMatches);\nconst filteredArray = search.filterTopMatches(results, searchArray)\n```\n\n### Prompt engineering\nGenerate improved prompts using LLMs:\n```js\nconst promptTemp = await Prompt.fromChatGPT(\"fantasy image with ninja jumping across buildings\", openaiApiKey);\nconsole.log(promptTemp.getInput());\n```\n\n### Language models\nimport:\n```js\nconst { RemoteLanguageModel, LanguageModelInput } = require('intellinode');\n```\ncall openai model:\n```js\nconst langModel = new RemoteLanguageModel('openai-key', 'openai');\nmodel_name = 'gpt-3.5-turbo-instruct'\n\nconst results = await langModel.generateText(new LanguageModelInput({\n  prompt: 'Write a product description for smart plug that works with voice assistant.',\n  model: model_name,\n  temperature: 0.7\n}));\n\nconsole.log('Generated text:', results[0]);\n```\nchange to call cohere models:\n\n```js\nconst langModel = new RemoteLanguageModel('cohere-key', 'cohere');\nmodel_name = 'command-xlarge-20221108'\n// ... same code\n```\n\n### Image models\n\nimport:\n```js\nconst { RemoteImageModel, SupportedImageModels, ImageModelInput } = require('intellinode');\n```\n\ncall DALL·E:\n```js\nprovider=SupportedImageModels.OPENAI;\n\nconst imgModel = new RemoteImageModel(apiKey, provider);\nconst images = await imgModel.generateImages(new ImageModelInput({\n    prompt: 'teddy writing a blog in times square',\n    numberOfImages: 1\n}));\n```\n\nchange to call Stable Diffusion:\n```js\nprovider=SupportedImageModels.STABILITY;\n// ... same code\n```\n\n### Openai advanced access\nTo access Openai services from your Azure account, you have to call the following function at the beginning of your application:\n```js\nconst { ProxyHelper } = require('intellinode');\nProxyHelper.getInstance().setAzureOpenai(resourceName);\n```\nTo access Openai from a proxy for restricted regions:\n```js\nProxyHelper.getInstance().setOpenaiProxyValues(openaiProxyJson);\n```\n\n\nFor more details and in-depth code, check [the samples](https://github.com/Barqawiz/IntelliNode/tree/main/samples/command_sample).\n\n# The code repository setup\n## First setup\n1. Initiate the project:\n```\ncd IntelliNode\nnpm install\n```\n\n2. Create a .env file with the access keys:\u003cbr\u003e\n```\nOPENAI_API_KEY=\u003ckey_value\u003e\nCOHERE_API_KEY=\u003ckey_value\u003e\nGOOGLE_API_KEY=\u003ckey_value\u003e\nSTABILITY_API_KEY=\u003ckey_value\u003e\nHUGGING_API_KEY=\u003ckey_value\u003e\n```\n\n## Test cases\n\n1. run the remote language models test cases:\n`node test/integration/RemoteLanguageModel.test.js`\n\n\n2. run the remote image models test cases:\n`node test/integration/RemoteImageModel.test.js`\n\n\n3. run the remote speech models test cases:\n`node test/integration/RemoteSpeechModel.test.js`\n\n4. run the embedding test cases:\n`node test/integration/RemoteEmbedModel.test.js`\n\n5. run the chatBot test cases:\n`node test/integration/Chatbot.test.js`\n\n# :closed_book: Documentation\n- [IntelliNode Wiki](https://github.com/Barqawiz/IntelliNode/wiki): Check the wiki page for indepeth instructions and practical use cases.\n- [Showcase](https://show.intellinode.ai/): Experience the potential of Intellinode in action, and use your keys to generate content and html pages.\n- [Samples](https://github.com/Barqawiz/IntelliNode/tree/main/samples/command_sample): Explore a code sample with detailed setup documentation to get started with Intellinode.\n- [Model Evaluation](https://www.intellinode.ai/articles/automate-evaluating-language-models): Demonstrate a swift approach to compare the performance of multiple models against designated target answers.\n- [Semantic Search](https://github.com/intelligentnode/IntelliNode/wiki/Semantic-Search): In-memory semantic search with iterator over large data.\n\n# Pillars\nThe module foundation:\n\n- **The wrapper layer** provides low-level access to the latest AI models\n- **The controller layer** offers a unified input to any AI model by handling the differences. So you can switch between models like Openai and Cohere without changing the code.\n- **The function layer** provides abstract functionality that extends based on the app's use cases. For example, an easy-to-use chatbot or marketing content generation utilities.\n\n# Roadmap\nCall for contributors:\n[registration form ](https://forms.gle/2JsEHAMaj2eMQHYc9).\n\n- [x] Add support to OpenAI completion \u0026 GPT4.\n- [x] Add support to OpenAI DALL·E 2.\n- [ ] Add support to other OpenAI functions.\n- [x] Add support to cohere generate models.\n- [ ] Add support to Google language models.\n- [x] Add support to Google speech models.\n- [x] Add support to LLaMa AWS private deployment.\n- [ ] Add support to Anthropic claude.\n- [ ] Add support to Midjourney image generation.\n- [x] Add support to Stable diffusion.\n- [x] Add support to hugging face inference.\n- [x] Add more high-level functions like semantic search, evaluation, etc.\n\n\n# License\nApache License\n\nCopyright 2023 Github.com/Barqawiz/IntelliNode\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintelligentnode%2FIntelliNode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintelligentnode%2FIntelliNode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintelligentnode%2FIntelliNode/lists"}