mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-10-08 21:20:20 +00:00
Removed deprecated seed parameter
This commit is contained in:
parent
0691634c4d
commit
e6ae96f96f
@ -73,7 +73,6 @@ public abstract class AgentBase(ILogger<AgentBase> logger, SettingsManager setti
|
|||||||
WorkspaceId = Guid.Empty,
|
WorkspaceId = Guid.Empty,
|
||||||
ChatId = Guid.NewGuid(),
|
ChatId = Guid.NewGuid(),
|
||||||
Name = string.Empty,
|
Name = string.Empty,
|
||||||
Seed = this.RNG.Next(),
|
|
||||||
SystemPrompt = systemPrompt,
|
SystemPrompt = systemPrompt,
|
||||||
Blocks = [],
|
Blocks = [],
|
||||||
};
|
};
|
||||||
|
@ -20,9 +20,6 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
protected IJSRuntime JsRuntime { get; init; } = null!;
|
protected IJSRuntime JsRuntime { get; init; } = null!;
|
||||||
|
|
||||||
[Inject]
|
|
||||||
protected ThreadSafeRandom RNG { get; init; } = null!;
|
|
||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
protected ISnackbar Snackbar { get; init; } = null!;
|
protected ISnackbar Snackbar { get; init; } = null!;
|
||||||
@ -199,7 +196,6 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
WorkspaceId = Guid.Empty,
|
WorkspaceId = Guid.Empty,
|
||||||
ChatId = Guid.NewGuid(),
|
ChatId = Guid.NewGuid(),
|
||||||
Name = string.Format(this.TB("Assistant - {0}"), this.Title),
|
Name = string.Format(this.TB("Assistant - {0}"), this.Title),
|
||||||
Seed = this.RNG.Next(),
|
|
||||||
Blocks = [],
|
Blocks = [],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -215,7 +211,6 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
|
|||||||
WorkspaceId = workspaceId,
|
WorkspaceId = workspaceId,
|
||||||
ChatId = chatId,
|
ChatId = chatId,
|
||||||
Name = name,
|
Name = name,
|
||||||
Seed = this.RNG.Next(),
|
|
||||||
Blocks = [],
|
Blocks = [],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -59,11 +59,6 @@ public sealed record ChatThread
|
|||||||
/// The name of the chat thread. Usually generated by an AI model or manually edited by the user.
|
/// The name of the chat thread. Usually generated by an AI model or manually edited by the user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Name { get; set; } = string.Empty;
|
public string Name { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The seed for the chat thread. Some providers use this to generate deterministic results.
|
|
||||||
/// </summary>
|
|
||||||
public int Seed { get; init; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The current system prompt for the chat thread.
|
/// The current system prompt for the chat thread.
|
||||||
|
@ -34,9 +34,6 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
|
|||||||
[Inject]
|
[Inject]
|
||||||
private ILogger<ChatComponent> Logger { get; set; } = null!;
|
private ILogger<ChatComponent> Logger { get; set; } = null!;
|
||||||
|
|
||||||
[Inject]
|
|
||||||
private ThreadSafeRandom RNG { get; init; } = null!;
|
|
||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
private IDialogService DialogService { get; init; } = null!;
|
private IDialogService DialogService { get; init; } = null!;
|
||||||
|
|
||||||
@ -436,7 +433,6 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
|
|||||||
ChatId = Guid.NewGuid(),
|
ChatId = Guid.NewGuid(),
|
||||||
DataSourceOptions = this.earlyDataSourceOptions,
|
DataSourceOptions = this.earlyDataSourceOptions,
|
||||||
Name = this.ExtractThreadName(this.userInput),
|
Name = this.ExtractThreadName(this.userInput),
|
||||||
Seed = this.RNG.Next(),
|
|
||||||
Blocks = this.currentChatTemplate == ChatTemplate.NO_CHAT_TEMPLATE ? [] : this.currentChatTemplate.ExampleConversation.Select(x => x.DeepClone()).ToList(),
|
Blocks = this.currentChatTemplate == ChatTemplate.NO_CHAT_TEMPLATE ? [] : this.currentChatTemplate.ExampleConversation.Select(x => x.DeepClone()).ToList(),
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -674,7 +670,6 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
|
|||||||
WorkspaceId = this.currentWorkspaceId,
|
WorkspaceId = this.currentWorkspaceId,
|
||||||
ChatId = Guid.NewGuid(),
|
ChatId = Guid.NewGuid(),
|
||||||
Name = string.Empty,
|
Name = string.Empty,
|
||||||
Seed = this.RNG.Next(),
|
|
||||||
Blocks = this.currentChatTemplate == ChatTemplate.NO_CHAT_TEMPLATE ? [] : this.currentChatTemplate.ExampleConversation.Select(x => x.DeepClone()).ToList(),
|
Blocks = this.currentChatTemplate == ChatTemplate.NO_CHAT_TEMPLATE ? [] : this.currentChatTemplate.ExampleConversation.Select(x => x.DeepClone()).ToList(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -16,9 +16,6 @@ public partial class Workspaces : MSGComponentBase
|
|||||||
[Inject]
|
[Inject]
|
||||||
private IDialogService DialogService { get; init; } = null!;
|
private IDialogService DialogService { get; init; } = null!;
|
||||||
|
|
||||||
[Inject]
|
|
||||||
private ThreadSafeRandom RNG { get; init; } = null!;
|
|
||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
private ILogger<Workspaces> Logger { get; init; } = null!;
|
private ILogger<Workspaces> Logger { get; init; } = null!;
|
||||||
|
|
||||||
@ -576,7 +573,6 @@ public partial class Workspaces : MSGComponentBase
|
|||||||
WorkspaceId = workspaceId,
|
WorkspaceId = workspaceId,
|
||||||
ChatId = Guid.NewGuid(),
|
ChatId = Guid.NewGuid(),
|
||||||
Name = string.Empty,
|
Name = string.Empty,
|
||||||
Seed = this.RNG.Next(),
|
|
||||||
SystemPrompt = SystemPrompts.DEFAULT,
|
SystemPrompt = SystemPrompts.DEFAULT,
|
||||||
Blocks = [],
|
Blocks = [],
|
||||||
};
|
};
|
||||||
|
@ -77,7 +77,6 @@ public partial class Writer : MSGComponentBase
|
|||||||
WorkspaceId = Guid.Empty,
|
WorkspaceId = Guid.Empty,
|
||||||
ChatId = Guid.NewGuid(),
|
ChatId = Guid.NewGuid(),
|
||||||
Name = string.Empty,
|
Name = string.Empty,
|
||||||
Seed = 798798,
|
|
||||||
SystemPrompt = """
|
SystemPrompt = """
|
||||||
You are an assistant who helps with writing documents. You receive a sample
|
You are an assistant who helps with writing documents. You receive a sample
|
||||||
from a document as input. As output, you provide how the begun sentence could
|
from a document as input. As output, you provide how the begun sentence could
|
||||||
|
@ -60,8 +60,6 @@ public class ProviderGroq(ILogger logger) : BaseProvider("https://api.groq.com/o
|
|||||||
_ => string.Empty,
|
_ => string.Empty,
|
||||||
}
|
}
|
||||||
}).ToList()],
|
}).ToList()],
|
||||||
|
|
||||||
Seed = chatThread.Seed,
|
|
||||||
|
|
||||||
// Right now, we only support streaming completions:
|
// Right now, we only support streaming completions:
|
||||||
Stream = true,
|
Stream = true,
|
||||||
|
@ -58,8 +58,6 @@ public sealed class ProviderMistral(ILogger logger) : BaseProvider("https://api.
|
|||||||
_ => string.Empty,
|
_ => string.Empty,
|
||||||
}
|
}
|
||||||
}).ToList()],
|
}).ToList()],
|
||||||
|
|
||||||
RandomSeed = chatThread.Seed,
|
|
||||||
|
|
||||||
// Right now, we only support streaming completions:
|
// Right now, we only support streaming completions:
|
||||||
Stream = true,
|
Stream = true,
|
||||||
|
@ -91,8 +91,6 @@ public sealed class ProviderOpenAI(ILogger logger) : BaseProvider("https://api.o
|
|||||||
_ => string.Empty,
|
_ => string.Empty,
|
||||||
}
|
}
|
||||||
}).ToList()],
|
}).ToList()],
|
||||||
|
|
||||||
Seed = chatThread.Seed,
|
|
||||||
|
|
||||||
// Right now, we only support streaming completions:
|
// Right now, we only support streaming completions:
|
||||||
Stream = true,
|
Stream = true,
|
||||||
|
@ -60,8 +60,6 @@ public sealed class ProviderX(ILogger logger) : BaseProvider("https://api.x.ai/v
|
|||||||
_ => string.Empty,
|
_ => string.Empty,
|
||||||
}
|
}
|
||||||
}).ToList()],
|
}).ToList()],
|
||||||
|
|
||||||
Seed = chatThread.Seed,
|
|
||||||
|
|
||||||
// Right now, we only support streaming completions:
|
// Right now, we only support streaming completions:
|
||||||
Stream = true,
|
Stream = true,
|
||||||
|
Loading…
Reference in New Issue
Block a user