
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
@braum-ai/sdk
Advanced tools
This is the official Braum AI SDK for TypeScript / JavaScript.
# npm
npm install @braum-ai/sdk
# yarn
yarn add @braum-ai/sdk
# pnpm
pnpm add @braum-ai/sdk
import { BraumAPI } from "@braum-ai/sdk";
const client = new BraumAPI({
apiKey: "braum_api_key",
modelId: "braum_model_id",
projectId: "braum_project_id",
});
const items = await client.recommend({
context: {
user_id: 1,
},
});
console.log(items);
// [
// {
// id: '847',
// score: 0.99,
// },
// {
// id: '1244',
// score: 0.998,
// },
// {
// id: '97714',
// score: 0.985,
// },
// ...
// ]
import { BraumAPI } from "@braum-ai/sdk";
const client = new BraumAPI({
apiKey: "braum_api_key",
modelId: "braum_model_id",
projectId: "braum_project_id",
});
const items = await client.recommendSimilar(4562, {
context: {
user_id: 1,
},
});
import { BraumAPI } from "@braum-ai/sdk";
const client = new BraumAPI({
apiKey: "braum_api_key",
modelId: "braum_model_id",
projectId: "braum_project_id",
});
const items = await client.sort([4562, 1245, 245], {
context: {
user_id: 1,
},
});
import { BraumAPI } from "@braum-ai/sdk";
const items = await client.recommend({
options: {
limit: 100,
},
context: {
user_id: 1,
},
filters: [
{
query: "SELECT * FROM items WHERE type = 'shoes'",
},
],
});
import { BraumAPI } from "@braum-ai/sdk";
const items = await client.recommend({
options: {
limit: 100,
},
context: {
user_id: 1,
},
boosters: [
{
query:
"SELECT *, CASE type WHEN 'shoes' THEN 1.2 WHEN 'hoodies' THEN 1.5 ELSE 1 END AS factor FROM items",
},
],
});
const sections = await client.blueprints.fetch("blueprint_id", {
context: {
variables: {
game_id_one: "asdas",
game_id_two: "asdsaa",
list_of_users: [
212, 3123, 12312, 312, 312
]
}
}
})
const items = await client.blueprints.recommend({
sections: [
{
name: "asdas",
method: "asdas",
filters: [
{
query: "SELECT * FROM items WHERE type = 'shoes'",
},
],
boosters: [
{
query: "SELECT *, CASE type WHEN 'shoes' THEN 1.2 ELSE 1 END AS factor FROM items",
}
]
options: {
limit: 10,
},
},
],
context: {
user_id: 1,
},
});
FAQs
Braum JavaScript SDK
We found that @braum-ai/sdk 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
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.