feat: vllm support
This commit is contained in:
@@ -81,6 +81,11 @@ export const ollamaModelOptions = [
|
||||
}
|
||||
];
|
||||
|
||||
export const backendOptionsMap = {
|
||||
llamaBox: 'llama-box',
|
||||
vllm: 'vllm'
|
||||
};
|
||||
|
||||
export const modelSourceMap: Record<string, string> = {
|
||||
huggingface: 'Hugging Face',
|
||||
ollama_library: 'Ollama Library',
|
||||
@@ -232,3 +237,22 @@ export const setSourceRepoConfigValue = (
|
||||
omits: omits
|
||||
};
|
||||
};
|
||||
|
||||
export const getbackendParameters = (data: any) => {
|
||||
const backendParameters = data.backend_parameters || {};
|
||||
const result: string[] = [];
|
||||
Object.keys(backendParameters)?.forEach((key: string) => {
|
||||
result.push(`${key}=${backendParameters[key]}`);
|
||||
});
|
||||
return result;
|
||||
};
|
||||
|
||||
export const setbackendParameters = (data: any) => {
|
||||
const result: Record<string, string> = {};
|
||||
const backendParameters = data.backend_parameters || [];
|
||||
backendParameters.forEach((item: string) => {
|
||||
const [key, value] = item.split('=');
|
||||
result[key] = value;
|
||||
});
|
||||
return result;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user