
Security News
Node.js Drops Bug Bounty Rewards After Funding Dries Up
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.
--------------------------------------
培养“人工智能学徒”,让它写代码去
--------------------------------------
一时无从谈起,即兴,查看成长履历吧
1、安装
npm i aify
2、教学
let aify = require('aify');
aify.at('小程')
.ai('自学')
.ok();
3、应用
let aify = require('aify');
aify.at('小程')
.ai('系统开发')
.tip('使用java语言')
.tip('百万日活量')
.ok({'设计书目录': './doc'});
开启WEB服务
1、安装 (不保证前后兼容)
npm i aify
2、开启WEB服务
let aify = require('aify');
aify.ai('Start-Web-Server')
.ok(8080); // 端口号缺省时等同8080
可以浏览器打开看了
同下
勤学好问,碰到容易混淆的新技能,必提issueissues查看功能天赋有混淆,忽略,无issue,先天功能自动让贤,任你学天赋严谨决策,对于容易引起误解的决策,输出警告提示演示勤学好问
1、安装 (不保证前后兼容)
npm i aify
2、教写js版helloworld
// demo-helloworld-1.skill
[name]
写helloworld
[keywords]
demo
[function]
module.exports = () => `
function hello(name){
return 'hello ' + name;
}
`;
let aify = require('aify');
aify.at('pg').learn('demo-helloworld-1.skill');
3、教写java版helloworld
// demo-helloworld-2.skill
[name]
写helloworld
[keywords]
demo
[function]
module.exports = () => `
public class HelloWorld {
public String hello(String name) {
return "hello " + name;
}
}
`;
let aify = require('aify');
aify.at('pg').learn('demo-helloworld-2.skill');
4、叫写代码
let aify = require('aify');
let rs = aify.at('pg')
.ai('写helloworld')
.tip('demo')
.ok();
console.log(rs); // => 写的是js版helloworld
控制台可以看到有WARNING,这时如果本意是想写java版代码,那就好像是无解了
所以,这种易混淆的技能应该避免,学到这种技能会主动提issue,这是它本分的事
5、查看issues
let aify = require('aify');
let rs = aify.at('pg').issues();
console.log(rs); // => [ { name: '写helloworld', keywords: [ 'demo' ] } ]
是时候人工干预了
考虑到可能重复学习,所以简单删除可能不是最好的方式,下次又学进来的话还得继续干预
最简单粗暴的方式就是,复制技能并改用不同名称,然后继续学习再使用新技能
目前版本无界面,只能手动
6、假如已人工介入调整了不同的基础分,就可以检查关闭issues了
let aify = require('aify');
aify.at('pg').ai('issues').ok('check'); // 检查并关闭已解决的相关issue
let rs = aify.at('pg').issues(); // 再查看下issues,应该是没了
console.log(rs); // => []
功力传授,复制就等同传授啦,调整控制本领变得更加灵活方便演练倾囊相授
1、安装 (不保证前后兼容)
npm i aify
2、教学
let aify = require('aify');
aify.at('小程') // 呼叫小程
.ai('自学') // 到npm自学去
.ok(); // 干活吧
呼叫小程,令其自学
3、检查学习成绩
let aify = require('aify');
let rs = aify.at('小程').intro('倾囊相授');
console.log(rs);
可以看到小程已经学会了'倾囊相授'
4、让‘小程’倾囊相授给‘小白’
let aify = require('aify');
let rs = aify.at('小程') // 呼叫小程
.ai('倾囊相授') // 慷慨得很
.ok('小白'); // 开始把全部功力传给‘小白’
console.log(rs); // => true
通常‘小白’最好是不会武功的人才,不然可能会承受不住功力的灌输而无法自控
也就是可能引起ai行为异常,或是传授前后ai行为不一致
所以,安全起见,会检查接受者是否为零功力,必须是白纸一张,做到非其人勿传
5、验证下‘小白’的功力
let aify = require('aify');
aify.at('小白') // 呼叫‘小白’
.ai('编写微服务基础组件') // 很懂的样子
.tip('greenwich', 'eureka') // 必要时可以给些提示
.ok({
clean: true, // 清空重写
build: false, // 写完就行不必编译打包
});
很明显,瞬间‘小白’也会了
'倾囊相授',在想要控制学习本领的版本时会非常有用
比如可以传授给‘小程1.0’、‘小程2.0’等等,在需要时又可以随时at唤出
同下
智能,改API接口,然后,老版本就淘汰了选择性学习,skill文件可指定aify的目标版本x.y.z中的x.y自我介绍,有什么本事必须要能被主人理解小程起了个小名pg,at('pg')就是at('小程'),固化天使也叫angel,这是小程的使命决策标准,评分更全面让小程干点正事
1、安装 (这回完全不兼容)
npm i aify
2、教学
let aify = require('aify');
aify.at('小程') // 呼叫小程
.ai('自学') // 到npm自学去
.ok(); // 干活吧
呼叫小程,令其智能的去npm自学,至少看起来是很AI的,而不是以往的'skill'
3、叫小程自我介绍
let aify = require('aify');
let rs = aify.at('小程').intro(); // 罗列学到的全部本事
也可以传入名称进行查看,比如intro(name1, name2)
4、叫小程写个微服务组件
let aify = require('aify');
aify.at('小程') // 呼叫小程
.ai('编写微服务基础组件') // 很智能的样子
.tip('greenwich', 'eureka') // 必要时可以给小程点提示
.ok({
clean: true, // 清空重写
build: false, // 不编译打包
});
其中ok的参数有十多个,都是有缺省值可以省略的
上面是随意写了两个,表示每次都重写,写完不编译打包
瞬间,小程也就写好了
5、已准备java、gradle环境、叫小程写完后并打包试试
let aify = require('aify');
aify.at('小程') // 呼叫小程
.ai('编写微服务基础组件') // 很智能的样子
.tip('greenwich', 'eureka') // 必要时可以给学徒点提示
.ok({
clean: true, // 清空重写
build: true, // 写完还要编译打包
groupId: 'ai.xiaochen', // 小程喜欢的域名
});
恩,小程喜欢有自己的groupId,写好程序立马打包好greenwich-eureka-1.0.0.jar
这样简单的java -jar greenwich-eureka-1.0.0.jar就可以跑起来了
女娲造人,不是为了男女搭配,而是多角色各司其职会更利于管理天使,名叫angel,天使仅有天赋,天真无邪,不学人间术天使对象互相使唤,能at来at去呼唤别人干活了孟婆汤,所有记忆按版本号区分不同目录存放,安装新版本后需要重新学习记忆文件不会自动删除,以备万一想较方便的找回现在得像真的带他们一样,不然可能教错人
1、安装 (不保证兼容嘛)
npm i aify
2、令其(aify)自学
let aify = require('aify');
let rs = aify.skill('自学').apply();
突然间,这位学徒就好像又懂了全部,这位同学是谁?
你喂的一声,叫来的学徒总会是aify
3、招个学徒令其自学
let aify = require('aify');
let xiaochen = aify.at('小程');
xiaochen.skill('自学').apply();
这就是女娲造就小程了
估计以后小程就是专职写程序
4、叫小程写代码
let aify = require('aify');
let src = aify.at('小程')
.skill('写代码')
.option('用 js 写个 helloworld')
.apply();
console.log(src); // => console.log('hello world');
这也算代码?呵呵,自学的吧
5、让aify叫小程写代码
let aify = require('aify');
let src = aify.at('aify') // 这是aify
.at('小程') // aify呼唤小程写代码
.skill('写代码')
.option('用 js 写个 helloworld')
.apply();
console.log(src); // => console.log('hello world');
看来,这往后学徒们的职责得分清,不然可能一直相互推辞
很有天赋,添加skill文件,增加不少天赋了嘛,比如airequire - 按需动态安装引用,不必事前npm install第三方包了自学 - 按关键字检索已发布的npm包,自觉下载学习他人技能学习技巧,懂得下载指定npm包并学习其中技能了自学,会去检索含aifyskill关键字的npm包,挖掘学习他人技能现在能这样子教学了
1、安装
npm i aify
2、令其自学
let aify = require('aify');
let rs = aify.skill('自学').apply();
突然间,这位学徒就好像懂了全部,潜质有点伟大的味道
3、试用自学本领
let aify = require('aify');
aify.skill('cmd').apply('npm search aifyskill');
成功,学霸啊这是
同下
不保证向前兼容、不保证向后兼容,模仿人类,就像小孩吃奶玩耍而大人吃饭劳动一样,不保证兼容爱学习本能,一安装好吃奶似的学起来天赋,现在起,安装完就已经会helloworld了天赋可塑性,就是框架实现了方便扩充天赋的能力,添加skill文件就行现学可以这样子
1、安装
npm i aify
2、运用helloworld天赋
let aify = require('aify');
let rs = aify.skill('helloworld').apply('world');
console.log(rs); // -> hello world!
无师自通,很神奇的样子
同下
人工智能框架*.skill文件填鸭式教学决策,以及技能运用现学现用helloworld
1.1、定义helloworld技能
// helloworld.skill
[name] // 技能名称,忽略大小写
helloworld
[keywords] // 特征关键词,忽略大小写,用空格逗号分号顿号等分隔多个特征
sample
[function] // 一个技能就是一个函数
function hello(name){
return 'hello ' + name;
}
1.2、填鸭式教学
let aify = require('aify');
aify.learn('helloworld.skill');
1.3、技能运用
let aify = require('aify');
let rs = aify.skill('helloworld').apply('world');
console.log(rs); // -> hello world
就是这样的三部曲,小学徒就好像会了helloworld一样
继续教它换个姿势打招呼
2.1、技能
// hi.skill
[name]
helloworld
[keywords]
sample,hi
[function]
function hello(name){
return 'hi ' + name;
}
2.2、教学
let aify = require('aify');
aify.learn('hi.skill');
2.3、运用
let aify = require('aify');
let rs = aify.skill('helloworld')
.option('hi')
.apply('ai');
console.log(rs); // -> hi ai
嗯 ... 孺子可教也
FAQs
市井玩味的人工智能框架,培养“人工智能学徒”,让它写代码去,就是这么AI
The npm package aify receives a total of 4 weekly downloads. As such, aify popularity was classified as not popular.
We found that aify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.