mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
add supprot for OpenAI-API-Compatible llm (#1787)
### What problem does this PR solve? #1771 add supprot for OpenAI-API-Compatible ### Type of change - [x] New Feature (non-breaking change which adds functionality) --------- Co-authored-by: Zhedong Cen <cenzhedong2@126.com>
This commit is contained in:
@ -17,4 +17,4 @@ export const UserSettingIconMap = {
|
||||
|
||||
export * from '@/constants/setting';
|
||||
|
||||
export const LocalLlmFactories = ['Ollama', 'Xinference','LocalAI','LM-Studio'];
|
||||
export const LocalLlmFactories = ['Ollama', 'Xinference','LocalAI','LM-Studio',"OpenAI-API-Compatible"];
|
||||
|
||||
@ -21,7 +21,8 @@ export const IconMap = {
|
||||
LocalAI: 'local-ai',
|
||||
StepFun: 'stepfun',
|
||||
NVIDIA:'nvidia',
|
||||
'LM-Studio':'lm-studio'
|
||||
'LM-Studio':'lm-studio',
|
||||
'OpenAI-API-Compatible':'openai-api'
|
||||
};
|
||||
|
||||
export const BedrockRegionList = [
|
||||
|
||||
@ -92,6 +92,13 @@ const OllamaModal = ({
|
||||
>
|
||||
<Input placeholder={t('baseUrlNameMessage')} />
|
||||
</Form.Item>
|
||||
<Form.Item<FieldType>
|
||||
label={t('apiKey')}
|
||||
name="api_key"
|
||||
rules={[{ required: false, message: t('apiKeyMessage') }]}
|
||||
>
|
||||
<Input placeholder={t('apiKeyMessage')} />
|
||||
</Form.Item>
|
||||
<Form.Item noStyle dependencies={['model_type']}>
|
||||
{({ getFieldValue }) =>
|
||||
getFieldValue('model_type') === 'chat' && (
|
||||
|
||||
Reference in New Issue
Block a user