Skip to content

Commit

Permalink
add back beam search
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicoptima committed Nov 5, 2023
1 parent 1a2c1e2 commit beafcdd
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export interface LoomSettings {
topP: number;
frequencyPenalty: number;
presencePenalty: number;
bestOf: number;
n: number;

showSettings: boolean;
Expand Down
4 changes: 3 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const DEFAULT_SETTINGS: LoomSettings = {
topP: 1,
frequencyPenalty: 0,
presencePenalty: 0,
bestOf: 0,
n: 5,

showSettings: false,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-loom",
"version": "1.16.4",
"version": "1.17.0",
"description": "Loom in Obsidian",
"main": "main.js",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit beafcdd

Please sign in to comment.