0.0.4 • Published 10 months ago

abregefrere v0.0.4

Weekly downloads
-
License
WTFPL
Repository
-
Last release
10 months ago

abregefrere

AI powered tools for summarizing texts

example

In this example, we gonna use mistral ai engine

create a config.json file

{
    "defaultLanguage": "fr-FR",
    "engine": {
        "name": "mistral",
        "configuration": {
            "apiKey": "your key",
            "model": "open-mixtral-8x22b"
        }
    }
}
const path = require('path');
const { 
    ConfigurationLoader, configFactory,
    Datasource, dataSourceFactory,
    Readabilizer, AbregeFrere
} = require('abregefrere');

(async () => {
    const config = await configFactory(
        ConfigurationLoader.jsonFile,
        { path: path.resolve(__dirname, './config.json')}
    );

    const dataSource = await dataSourceFactory(
        Datasource.http,
        {
            readabilizer: Readabilizer.html,
            url: 'https://fr.wiktionary.org/wiki/baragouiner'
        }
    );

    const abregeFrere = new AbregeFrere(config);
    await abregeFrere.init();
    const response = await abregeFrere.fiveDots(dataSource);
    console.log('fiveDots response:');
    console.log(response.fiveDots);
    console.log('summary:');
    console.log(response.summary);
})();
0.0.4

10 months ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago