Compare commits

..

5 Commits

Author SHA1 Message Date
Dot.L 4e0239d282 Merge pull request #259 from APIParkLab/feature/1.6-liujian
Feature/1.6 liujian
2025-03-14 19:17:25 +08:00
ningyv 92e47812bd Merge pull request #258 from APIParkLab/feature/1.6-cx
feat: feature/1.6-Integrate custom model
2025-03-14 18:48:35 +08:00
ningyv 2e867da093 feat: feature/1.6-Integrate custom model 2025-03-14 18:47:04 +08:00
Dot.L 7eca309eac Merge pull request #257 from APIParkLab/feature/1.6-liujian
Feature/1.6 liujian
2025-03-13 22:17:32 +08:00
Dot.L 31abd609e6 Merge pull request #256 from APIParkLab/feature/1.6-liujian
Feature/1.6 liujian
2025-03-13 14:17:39 +08:00
6 changed files with 12 additions and 10 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ body:
label: Environment
description: Share your environment details. Reports without proper environment details will likely be closed.
value: |
- ApiPark version:
- APINTO Dashboard version:
- Operating system (run `uname -a`):
validations:
required: true
@@ -89,7 +89,7 @@ provider_credential_schema:
zh_Hans: 为了进行验证,请输入一个您可用的模型名称 (例如:amazon.titan-text-lite-v1)
model_config:
access_configuration_status: true
access_configuration_demo: "{\"region\":\"\",\"model\":\"\"}"
access_configuration_demo: "{}"
address: https://bedrock-runtime.amazonaws.com
sort: 4
recommend: true
@@ -29,12 +29,12 @@ provider_credential_schema:
placeholder:
zh_Hans: 在此输入您的 API Key
en_US: Enter your API Key
- variable: dashscope_api_base
- variable: base_url
label:
en_US: https://dashscope.aliyuncs.com/compatible-mode/v1
en_US: https://api.baichuan-ai.com/v1
type: text-input
required: false
placeholder:
zh_Hans: 在此输入您的 Base URL
en_US: Enter your Base URL
address: https://dashscope.aliyuncs.com/compatible-mode/v1
address: https://api.baichuan-ai.com/v1
@@ -283,8 +283,9 @@ const AiSettingModalContent = forwardRef<AiSettingModalContentHandle, AiSettingM
),
onOk: () => {
return addModelModalRef.current?.save().then((res) => {
if (res === true) {
if (res) {
getLlmList(lastLlmID)
form.setFieldValue('defaultLlm', res)
}
})
},
@@ -102,7 +102,7 @@ const AddModels = forwardRef<addModelsContentHandle, addModelContentProps>((prop
...value,
id: modelID
}
fetchData<BasicResponse<null>>('ai/provider/model', {
fetchData<BasicResponse<{ model: { id: string, name: string } }>>('ai/provider/model', {
method: type === 'edit' ? 'PUT' : 'POST',
eoParams: { provider: providerID },
eoBody: finalValue,
@@ -112,7 +112,8 @@ const AddModels = forwardRef<addModelsContentHandle, addModelContentProps>((prop
const { code, msg } = response
if (code === STATUS_CODE.SUCCESS) {
message.success($t(RESPONSE_TIPS.success) || msg)
resolve(true)
const llmId = response.data?.model?.id
resolve(llmId)
} else {
message.error(msg || $t(RESPONSE_TIPS.error))
reject(msg || $t(RESPONSE_TIPS.error))
+2 -2
View File
@@ -596,9 +596,9 @@ func (i *imlMonitorStatisticModule) TopAPIStatistics(ctx context.Context, limit
} else {
statisticItem.IsRed = true
if key == "-" {
statisticItem.Name = "Unknown API"
statisticItem.Name = "API"
} else {
statisticItem.Name = fmt.Sprintf("Unknow-%s", key)
statisticItem.Name = fmt.Sprintf("未知API-%s", key)
}
}
result = append(result, statisticItem)