A clean and minimal youtube frontend, without all the ads and whistles
JavaScript
feat: support maxTokens in generic llm provider
Christian Feiee067fb693d0
diff --git a/lib/llm/providers/generic.js b/lib/llm/providers/generic.jsindex 620b35d..ba60e62 100644--- a/lib/llm/providers/generic.js+++ b/lib/llm/providers/generic.js@@ -7,6 +7,7 @@ export class Generic {endpoint,apiKey,temperature,+ maxTokens}) {this.system = systemthis.model = model@@ -14,6 +15,7 @@ export class Generic {this.endpoint = endpointthis.apiKey = apiKeythis.temperature = temperature+ this.maxTokens = maxTokens || MAX_TOKENS}getHeaders () {@@ -26,6 +28,7 @@ export class Generic {return JSON.stringify({model: this.model,temperature: Number(this.temperature),+ maxTokens: this.maxTokens,messages: [{ role: "system", content: this.system },{ role: "user", content: prompt }