mirror of
https://github.com/enricoros/big-AGI.git
synced 2026-05-11 14:10:15 -07:00
10 lines
324 B
TypeScript
10 lines
324 B
TypeScript
import { nanoid } from 'nanoid';
|
|
|
|
/**
|
|
* There's a copy of this function in src/common/util/idUtils.ts, but that one is for client-side use.
|
|
* This one is for server-side use.
|
|
*/
|
|
export function serverSideId(_serverScope: 'aix-tool-call-id' | 'aix-tool-response-id', digits?: number) {
|
|
return 'aix_' + nanoid(digits);
|
|
}
|