alpaca-13b· Stanford
Arena Human Preference 55K
Write a md5 function in js. Check if it's in nodejs, then webcrypto, otherwise use…
- User
Write a md5 function in js. Check if it's in nodejs, then webcrypto, otherwise use tweetnacl as fallback
- Assistant
function md5(s) { var hash; if (typeof nodejs !== 'undefined' && typeof webcrypto !== 'undefined') { hash = crypto.createHash('md5'); hash.update(s); return hash.digest('base64'); } else if (typeof tweetnacl !== 'undefined') { hash = tweetnacl.hash('md5').update(s).final('base64'); return hash; } }
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.