Files
abitat/examples/3-basic-interaction.ts
T
Wlad Paiva 84c2d7a400 add plugins
2023-10-17 12:32:09 -03:00

30 lines
719 B
TypeScript

import {AIbitat} from '../src'
import {terminal} from '../src/plugins'
const aibitat = new AIbitat({
nodes: {
client: 'manager',
manager: ['mathematician', 'reviewer', 'client'],
},
config: {
client: {
type: 'assistant',
},
manager: {type: 'manager'},
mathematician: {
type: 'agent',
role: `You are a mathematician and only solve math problems from client`,
},
reviewer: {
type: 'agent',
role: `You are a peer-reviewer and you do not solve math problems. Check the result from mathematician and then confirm. Just confirm, no talk.`,
},
},
}).use(terminal())
await aibitat.start({
from: 'client',
to: 'manager',
content: '2 + 2 = ?',
})