diff --git a/common.ts b/common.ts index 8941eef..7874fb3 100644 --- a/common.ts +++ b/common.ts @@ -26,6 +26,7 @@ export interface LoomSettings { topP: number; frequencyPenalty: number; presencePenalty: number; + bestOf: number; n: number; showSettings: boolean; diff --git a/main.ts b/main.ts index ad5ba3c..d9c05d0 100644 --- a/main.ts +++ b/main.ts @@ -73,6 +73,7 @@ const DEFAULT_SETTINGS: LoomSettings = { topP: 1, frequencyPenalty: 0, presencePenalty: 0, + bestOf: 0, n: 5, showSettings: false, @@ -1274,7 +1275,8 @@ export default class LoomPlugin extends Plugin { body: JSON.stringify({ prompt, max_tokens: this.settings.maxTokens, - n: this.settings.n, + best_of: this.settings.bestOf, + n: this.settings.n, temperature: this.settings.temperature, top_p: this.settings.topP, frequency_penalty: this.settings.frequencyPenalty, diff --git a/manifest.json b/manifest.json index 4a8dc4b..0eba594 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "loom", "name": "Loom", - "version": "1.16.4", + "version": "1.17.0", "minAppVersion": "0.15.0", "description": "Loom in Obsidian", "author": "celeste", diff --git a/package.json b/package.json index 3d85d37..13a7505 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-loom", - "version": "1.16.4", + "version": "1.17.0", "description": "Loom in Obsidian", "main": "main.js", "scripts": { diff --git a/views.ts b/views.ts index f209a8c..6c1dbd4 100644 --- a/views.ts +++ b/views.ts @@ -322,6 +322,7 @@ export class LoomView extends ItemView { setting("Context length", "contextLength", String(settings.contextLength), "int"); setting("Length (in tokens)", "maxTokens", String(settings.maxTokens), "int"); setting("Number of completions", "n", String(settings.n), "int"); + setting("Best of (0 = no beam search)", "bestOf", String(settings.bestOf), "int"); setting("Temperature", "temperature", String(settings.temperature), "float"); setting("Top p", "topP", String(settings.topP), "float"); setting("Frequency penalty", "frequencyPenalty", String(settings.frequencyPenalty), "float");