Generate random seed for HF endpoint
This commit is contained in:
parent
e59fb85db8
commit
e6e8d7726b
|
@ -1184,7 +1184,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
|
||||||
if (settings.type === HUGGINGFACE) {
|
if (settings.type === HUGGINGFACE) {
|
||||||
params.top_p = Math.min(Math.max(Number(params.top_p), 0.0), 0.999);
|
params.top_p = Math.min(Math.max(Number(params.top_p), 0.0), 0.999);
|
||||||
params.stop = Array.isArray(params.stop) ? params.stop.slice(0, 4) : [];
|
params.stop = Array.isArray(params.stop) ? params.stop.slice(0, 4) : [];
|
||||||
nonAphroditeParams.seed = settings.seed >= 0 ? settings.seed : undefined;
|
nonAphroditeParams.seed = settings.seed >= 0 ? settings.seed : Math.floor(Math.random() * Math.pow(2, 32));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings.type === MANCER) {
|
if (settings.type === MANCER) {
|
||||||
|
|
Loading…
Reference in New Issue