
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
@glennjones/prompt
Advanced tools
At the moment this code is more of a sketched idea than a library, but it is usable if you are interested in tring it out. It may be well your time worth looking at the [Langchain JS](https://github.com/hwchase17/langchainjs) which is the most heavily use
At the moment this code is more of a sketched idea than a library, but it is usable if you are interested in tring it out. It may be well your time worth looking at the Langchain JS which is the most heavily used tool of this type at the moment (Apr 2023). It is more advanced and has a lot of additional/useful features this tool does not have.
Its a light warpper around LLM inetrfaces such as OpenAI's ChatGPT. It provides:
I have been using it to benchmark NER and Classification tasks with OpenAI prompts against other approcahes.
npm i @glennjones/prompt
const Prompt = require('prompt');
const {Prompter, OpenAI} = Prompt;
import {OpenAI, Prompter} from prompt
let model = new OpenAI(apiKey);
let prompt = new Prompter(model);
let result = await prompt.fit('ner', {
domain: 'ux design',
textInput: 'Senior UX Researcher, part-time 6 month contract, Edinburgh - Hybrid',
});
console.log(result);
### Output
{
promptTokens: 152,
completionTokens: 99,
totalTokens: 251,
data: [
{ label: 'Position', text: 'Senior UX Researcher' },
{ label: 'Contract Type', text: 'part-time' },
{ label: 'Contract Duration', text: '6 month' },
{ label: 'Location', text: 'Edinburgh' },
{ label: 'Work Type', text: 'Hybrid' },
{ branch: 'UX Design', group: 'Research' }
]
}
Based on the ideas/code of Promptify - https://github.com/promptslab/promptify
FAQs
At the moment this code is more of a sketched idea than a library, but it is usable if you are interested in tring it out. It may be well your time worth looking at the [Langchain JS](https://github.com/hwchase17/langchainjs) which is the most heavily use
We found that @glennjones/prompt 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.

Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.

Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.

Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.