Added MCP, Hybrid Memories and Skill support
This commit is contained in:
21
main.mjs
Normal file
21
main.mjs
Normal file
@@ -0,0 +1,21 @@
|
||||
import {Ai} from './dist/index.mjs';
|
||||
|
||||
const ai = new Ai({
|
||||
path: './',
|
||||
llm: {
|
||||
system: 'You are a testbed for developing an AI library',
|
||||
models: {
|
||||
'qwen/qwen3.5-9b': {proto: 'openai', host: 'http://127.0.0.1:1234/v1'}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const skills = [{
|
||||
name: 'Momentum',
|
||||
description: 'Learn how to use the Momentum API',
|
||||
content: 'You can initialize it with: new Momentum(url);'
|
||||
}];
|
||||
|
||||
const history = [], memory = [];
|
||||
console.log(await ai.language.ask('Can you tell me how to use momentum?', {history, skills}));
|
||||
console.log(history, memory);
|
||||
Reference in New Issue
Block a user