Files
OpenPipe-llm/app/src/server/utils/generateApiKey.ts
2023-08-08 11:45:03 -07:00

6 lines
169 B
TypeScript

import cryptoRandomString from "crypto-random-string";
const KEY_LENGTH = 42;
export const generateApiKey = () => `opc_${cryptoRandomString({ length: KEY_LENGTH })}`;