fix: display image menu

This commit is contained in:
jialin
2025-11-10 10:07:25 +08:00
parent 0077d109e7
commit 285e274818
25 changed files with 91 additions and 86 deletions
+12 -1
View File
@@ -1,3 +1,13 @@
export const VLLMMetaKeys: Record<string, any> = {};
export const SGLangMetaKeys: Record<string, any> = {};
/**
* LLM Meta Keys
* @description Keys used for configuring large language models (LLMs)
* These keys are from model metadata
* These values are set to the from, use uniform keys for easier management
*/
export const LLM_METAKEYS: Record<string, any> = {
seed: 'seed',
stop: 'stop',
@@ -8,7 +18,8 @@ export const LLM_METAKEYS: Record<string, any> = {
max_model_len: 'max_model_len',
frequency_penalty: 'frequency_penalty',
presence_penalty: 'presence_penalty',
max_total_tokens: 'max_total_tokens'
max_total_tokens: 'max_total_tokens',
max_stop_sequences: 'stop'
};
export const precisionTwoKeys = [
@@ -76,6 +76,8 @@ export const useInitLLmMeta = (
return model;
}, [model, modelList, isChat]);
const getLLamaBoxMeta = (meta: any) => {};
const getMaxTokens = (meta: any) => {
const { max_model_len, n_ctx, n_slot, max_total_tokens } = meta || {};
+2 -1
View File
@@ -138,13 +138,14 @@ const TextToImages: React.FC = () => {
options={optionsList}
size="middle"
className="m-l-40 font-600"
value={activeKey}
onChange={(key) => setActiveKey(key)}
></Segmented>
}
</div>
)
};
}, [optionsList]);
}, [activeKey, optionsList, intl]);
useHotkeys(
HotKeys.RIGHT.join(','),
+2 -1
View File
@@ -130,13 +130,14 @@ const Playground: React.FC = () => {
options={optionsList}
size="middle"
className="m-l-40 font-600"
value={activeKey}
onChange={(key) => setActiveKey(key)}
></Segmented>
}
</div>
)
};
}, [optionsList]);
}, [activeKey, optionsList, intl]);
useHotkeys(
HotKeys.RIGHT.join(','),
+1 -1
View File
@@ -182,7 +182,7 @@ const Playground: React.FC = () => {
</div>
)
};
}, [activeKey, optionsList]);
}, [activeKey, optionsList, intl]);
useHotkeys(
HotKeys.RIGHT.join(','),