Skip to content
This repository was archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
Remove Useless Stuff (#291)
Browse files Browse the repository at this point in the history
* Remove Useless Stuff

- [+] refactor: remove system_fingerprint from NewStuffLLMs.ts, openai.ts, and config.ts

* Fix [LLM APIs] [Google AI] Remove Useless Stuff

- [+] fix(google.ts): remove unused system_fingerprint parameter from getNewStuff function call

* Fix [UI/UX] [Masks] [EN] Remove Useless Stuff

- [+] fix(en.ts): remove unused system_fingerprint field from EN_MASKS
  • Loading branch information
H0llyW00dzZ authored Feb 27, 2024
1 parent 1bf37c0 commit 1b3eb35
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 19 deletions.
4 changes: 0 additions & 4 deletions app/client/platforms/NewStuffLLMs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
*
* @param model - The model name.
* @param max_tokens - The maximum number of tokens.
* @param system_fingerprint - The system fingerprint.
* @param useMaxTokens - Indicates whether to use the maximum number of tokens.
* @returns An object containing the configuration for new features:
* - max_tokens: The maximum number of tokens.
Expand All @@ -27,12 +26,10 @@ import {
export function getNewStuff(
model: string,
max_tokens?: number,
system_fingerprint?: string,
useMaxTokens: boolean = true,
): {
max_tokens?: number;
maxOutputTokens?: number; // This is the same as maxTokens but for Google AI
system_fingerprint?: string;
isNewModel: boolean;
payloadType: 'chat' | 'image';
isDalle: boolean;
Expand All @@ -52,7 +49,6 @@ export function getNewStuff(
return {
max_tokens: tokens,
maxOutputTokens: tokens, // Assign the same value to maxOutputTokens
system_fingerprint: system_fingerprint ?? modelConfig.system_fingerprint,
isNewModel: true,
payloadType,
isDalle,
Expand Down
1 change: 0 additions & 1 deletion app/client/platforms/google.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ export class GeminiProApi implements LLMApi {
const { max_tokens } = getNewStuff(
options.config.model,
chatConfig.max_tokens,
chatConfig.system_fingerprint,
chatConfig.useMaxTokens,
);

Expand Down
3 changes: 1 addition & 2 deletions app/client/platforms/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,9 @@ export class ChatGPTApi implements LLMApi {
* @example : A Best Picture of Andromeda Galaxy
*/
const actualModel = getModelForInstructVersion(modelConfig.model);
const { max_tokens, system_fingerprint } = getNewStuff(
const { max_tokens } = getNewStuff(
modelConfig.model,
modelConfig.max_tokens,
modelConfig.system_fingerprint,
modelConfig.useMaxTokens,
);

Expand Down
2 changes: 0 additions & 2 deletions app/masks/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export const EN_MASKS: BuiltinMask[] = [
quality: "hd",
size: "1024x1024",
style: "vivid",
system_fingerprint: "",
sendMemory: true,
useMaxTokens: false,
historyMessageCount: 10,
Expand Down Expand Up @@ -60,7 +59,6 @@ export const EN_MASKS: BuiltinMask[] = [
quality: "hd",
size: "1024x1024",
style: "vivid",
system_fingerprint: "",
sendMemory: true,
historyMessageCount: 10,
compressMessageLengthThreshold: 5000,
Expand Down
10 changes: 0 additions & 10 deletions app/store/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ export const DEFAULT_CONFIG = {
* `Natural` causes the model to produce more natural, less hyper-real looking images.
*/
style: "vivid", // Only DALL·E-3 for DALL·E-2 not not really needed
system_fingerprint: "",
sendMemory: true,
useMaxTokens: false,
historyMessageCount: 4,
Expand Down Expand Up @@ -260,15 +259,6 @@ export const useAppConfig = createPersistStore(
};
}

// In the wilds 🚀 (still wip because it confusing for LLM + Generative AI Method)

if (version < 4.2) {
state.modelConfig = {
...state.modelConfig,
system_fingerprint: "",
};
}

// Speed Animation default is 30, Lower values will result in faster animation

if (version < 4.3) {
Expand Down

0 comments on commit 1b3eb35

Please sign in to comment.