Skip to content

Releases: intelligentnode/IntelliNode

IntelliNode v0.0.13

01 May 21:32
Compare
Choose a tag to compare

v0.0.13

New Features 🌟

  • Text Analyzer Function: introduce the Text Analyzer function, which supports summarization and sentiment analysis using multiple AI models (openai or cohere).
  • Hugging Face Wrapper 🤗: support Hugging Face inference! With our Hugging Face Wrapper, you can now call Hugging Face models using shorter code than ever. Experience the shortest way to integrate Hugging Face models into your applications.

Changes 🔧

  • Chatbot: Update chatGPT to support extra optional parameters for flexible implementation.

Code Examples 💻

Text Analyzer

const { TextAnalyzer, SupportedLangModels } =  require('intellinode');
// provider values: SupportedLangModels.openai OR SupportedLangModels.cohere
async function summarize(text, apiKey, provider) {
  const analyzer = new TextAnalyzer(apiKey, provider);
  return await analyzer.summarize(text);
}

Hugging Face
Common import for any hugging face model:

const { HuggingWrapper } =  require('intellinode');
const huggingWrapper = new HuggingWrapper(process.env.HUGGING_API_KEY);

Summary using facebook large-cnn:

const modelId = 'facebook/bart-large-cnn';
const result = await huggingWrapper.generateText(modelId, inputData);

Image classification using vit-base model

const imageData = require('fs').readFileSync(imagePath);
const result = await huggingWrapper.processImage('google/vit-base-patch16-224', imageData);

ChatGPT with extra options

const { Chatbot, ChatGPTInput } = require('intellinode');
// define the model response using the system
const input = new ChatGPTInput('You are a helpful assistant.', { model: 'gpt-4'} );
input.addUserMessage('What is the distance between the Earth and the Moon?');
const responses = await chatbot.chat(input);

Install

npm i intellinode

IntelliNode v0.0.10

30 Apr 21:54
e3d06e3
Compare
Choose a tag to compare

New Features 🌟

  • Embeddings: IntelliNode now supports multi-language embeddings from multiple providers, OpenAI and Cohere. This feature enables developers to extract contextualized representations of text.
  • Semantic Search: Add a new semantic search function to search arrays of text and match the closest meaning.

Changes 🔧

  • Update the default cohere model.
  • Add more samples.

Code Examples 💻

Semantic Search
example of search item and searchable list:

const pivotItem = 'Hello from OpenAI!';
const searchArray = ['Greetings from OpenAI!', 'Bonjour de OpenAI!', 'Hola desde OpenAI!'];
const numberOfMatches =2;

semantic search functionality:

const { SemanticSearch } = require('intellinode');

// prepare the search object with 'openai' or 'cohere' provider
// the apiKey generated from the provider
const search = new SemanticSearch(apiKey, provider);

// execute the match function, return top items with similarity scores
const results = await search.getTopMatches(pivotItem, searchArray, numberOfMatches);

Embeddings

const { RemoteEmbedModel, EmbedInput } = require('intellinode');

const embedModel = new RemoteEmbedModel(openaiApiKey);

const results = await embedModel.getEmbeddings(new EmbedInput({
    texts: ['Hello from OpenAI!', '您好,来自 OpenAI!'],
    model: 'text-embedding-ada-002',
}));

Install

npm i intellinode

IntelliNode v0.0.5

24 Apr 19:16
Compare
Choose a tag to compare

Release the MVP version:

  • OpenAI text completion and chatGPT.
  • Cohere.ai text completion models.
  • OpenAI DALL·E 2 image genration.
  • Stability.ai diffusion image generation.
  • Google speech models for English, Arabic, German, Chinese, Turkish, and more. 🔉

Features

  • One library to access any model.
  • Switch between AI models with minimum code change.
  • Lightweight, less than 1 MB. 🚅
  • Only two dependencies required.

Install

One command to access all models:
npm i intellinode

For more details, check out the npm module page:
https://www.npmjs.com/package/intellinode