Procházet zdrojové kódy

add model support for claude

tycoding před 1 rokem
rodič
revize
d0bbad5d21

+ 1 - 1
langchat-app/src/main/java/cn/tycoding/langchat/app/endpoint/auth/CompletionRes.java

@@ -54,7 +54,7 @@ public class CompletionRes {
                         .build())
                 .choices(List.of(ChatCompletionChoice
                         .builder()
-                        .finishReason(res.finishReason().toString())
+                        .finishReason(res.finishReason() == null ? "finish" : res.finishReason().toString())
                         .build()))
                 .build();
     }

+ 1 - 1
langchat-ui/src/views/aigc/model/components/chat/index.vue

@@ -110,7 +110,7 @@
     <div class="w-full">
       <n-alert
         class="w-full mb-4 mt-2 min-alert"
-        title="如果使用第三方代理,需要填写BaseUrl,并增加`/v1`后缀,官方Key不需要设置BaseUrl"
+        title="如果使用第三方代理,需要填写BaseUrl,并增加`/v1`后缀,官方Key不需要设置BaseUrl。如果你使用的第三方代理将所有供应商的接口格式都封装为openai的格式,只需要在OpenAI中自定义配置其他供应商模型即可"
         type="info"
       />
       <BasicTable

+ 1 - 0
langchat-ui/src/views/aigc/model/components/chat/schemas.ts

@@ -134,6 +134,7 @@ export const openaiSchemas: FormSchema[] = [
     component: 'NSelect',
     rules: [{ required: true, message: '请选择模型', trigger: ['blur'] }],
     componentProps: {
+      tag: true,
       filterable: true,
       options: getModels(ProviderEnum.OPENAI),
     },