acknowledge user-provided maxStopWords in HuggingFaceTGI.ts
This commit is contained in:
parent
3d1f577975
commit
c9324542fc
1 changed files with 4 additions and 1 deletions
|
|
@ -37,7 +37,10 @@ class HuggingFaceTGI extends BaseLLM {
|
|||
top_k: options.topK,
|
||||
presence_penalty: options.presencePenalty,
|
||||
frequency_penalty: options.frequencyPenalty,
|
||||
stop: options.stop?.slice(0, HuggingFaceTGI.MAX_STOP_TOKENS),
|
||||
stop: options.stop?.slice(
|
||||
0,
|
||||
this.maxStopWords ?? HuggingFaceTGI.MAX_STOP_TOKENS,
|
||||
),
|
||||
};
|
||||
|
||||
return finalOptions;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue