Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
BAIDU UNIT API, see more UNIT
npm install unit
const { Unit } = require('ai-unit')
async function main() {
try {
const unitClient = new Unit({
apikey: 'your key',
secretkey: 'yout secret key',
sceneid: '15386'
})
const sessionId = Date.now()
let answer
answer = await unitClient.query('我要买电影票', sessionId.toString())
console.log('[PERSON]:' + '我要买电影票')
console.log('[BOT]:' + answer)
answer = await unitClient.query('心理罪', sessionId.toString())
console.log('[PERSON]:' + '心理罪')
console.log('[BOT]:' + answer)
answer = await unitClient.query('天幕吧', sessionId.toString())
console.log('[PERSON]:' + '天幕吧')
console.log('[BOT]:' + answer)
} catch (error) {
console.error(error)
}
}
main()
Result as follows:
[PERSON]:我要买电影票
[BOT]:看哪部电影?
[PERSON]:心理罪
[BOT]:去哪个电影院?
[PERSON]:天幕吧
[BOT]:订哪天的?
FAQs
baidu nlu platform UNIT API
We found that ai-unit 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.