1.0.16 • Published 20 days ago

fullmetal-agent v1.0.16

Weekly downloads
-
License
ISC
Repository
-
Last release
20 days ago

Installation

  1. npm install fullmetal-agent

Usage

const Fullmetal = require('fullmetal-agent');
const modelList = [
  {
    name: process.env.MODEL_NAME,
    file:  process.env.MODEL_FILE,
  },
];

const fullMetalConfig = {
  name: process.env.AGENT_NAME,
  apiKey: process.env.FULLMETAL_API_KEY,
  models: modelList.map((m) => m.name),
};

const fullmetalAgent = new Fullmetal(fullMetalConfig);
fullmetalAgent.onPrompt(async (data) => {

  await getApiResponse(data, async (response) => {
    // response= {token:'', completed:false, speed:10, model:''Wizard-Vicuna-7B-Uncensored'}
    fullmetalAgent.sendResponse(response);
  });
});

const getApiResponse = async (data, cb) => {
  // YOUR agent code to generate the resposne
  // cb({ token: msg });
};

DEMO

Click here to see the sample code

1.0.16

20 days ago

1.0.15

5 months ago

1.0.14

5 months ago

1.0.13

5 months ago

1.0.9

6 months ago

1.0.8

6 months ago

1.0.11

6 months ago

1.0.10

6 months ago

1.0.12

6 months ago

1.0.2

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.1

9 months ago

1.0.0

9 months ago