mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-14 20:41:15 +08:00
Merge remote-tracking branch 'origin/main' into feature/translate
This commit is contained in:
@@ -45,19 +45,18 @@ body:
|
||||
label: Steps to Reproduce
|
||||
description: Share the steps you took so that we can reproduce the issue. Reports without proper steps details will likely be closed.
|
||||
placeholder: |
|
||||
1. Run apinto via the Docker image.
|
||||
2. Create a Route with the Admin API.
|
||||
3. Try configuring ...
|
||||
4. ...
|
||||
1. Run APIPark via the Docker image.
|
||||
2. Try configuring ...
|
||||
3. ...
|
||||
validations:
|
||||
required: true
|
||||
required: false
|
||||
- type: textarea
|
||||
id: environment
|
||||
attributes:
|
||||
label: Environment
|
||||
description: Share your environment details. Reports without proper environment details will likely be closed.
|
||||
value: |
|
||||
- APINTO Dashboard version (run `apinto dashboard version`):
|
||||
- APINTO Dashboard version:
|
||||
- Operating system (run `uname -a`):
|
||||
validations:
|
||||
required: true
|
||||
@@ -25,7 +25,7 @@ body:
|
||||
label: Environment
|
||||
description: Share your environment details. Reports without proper environment details will likely be closed.
|
||||
value: |
|
||||
- APIPark version (run `apinto dashboard version`):
|
||||
- APIPark version:
|
||||
- Operating system (run `uname -a`):
|
||||
validations:
|
||||
required: true
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg version="1.1" id="_x32_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="800px" height="800px" viewBox="0 0 512 512" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
.st0{fill:#000000;}
|
||||
]]>
|
||||
</style>
|
||||
<g>
|
||||
<path class="st0" d="M485.016,220.691c12.422-8.422,22.188-57.266,7.797-87.016c-26.859,28.125-80.109,49.859-142,72.922
|
||||
c-64.656,24.078-71.531,41.859-94.813,42.172c-23.297-0.313-30.156-18.094-94.813-42.172c-61.891-23.063-115.141-44.797-142-72.922
|
||||
c-14.406,29.75-4.625,78.594,7.781,87.016C13.484,214.332,0,210.051,0,210.051s3.813,68.172,33.25,106.563
|
||||
c24.953,32.547,86.984,72.906,145.828,58.828c62.219-14.875,62.344-41.406,76.922-41.266c14.563-0.141,14.688,26.391,76.906,41.266
|
||||
c58.844,14.078,120.875-26.281,145.844-58.828C508.156,278.223,512,210.051,512,210.051S498.5,214.332,485.016,220.691z
|
||||
M131.438,318.848c-25.109-11.641-46.063-37.422-43.188-73.891c12.813,5.078,48.844,9.406,69.094,17.281
|
||||
c23,8.953,46.031,23.984,48.922,41.25C205.313,317.879,170.75,337.066,131.438,318.848z M380.563,318.848
|
||||
c-39.344,18.219-73.875-0.969-74.828-15.359c2.891-17.266,25.891-32.297,48.922-41.25c20.25-7.875,56.281-12.203,69.094-17.281
|
||||
C426.625,281.426,405.656,307.207,380.563,318.848z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg version="1.1" id="_x32_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="800px" height="800px" viewBox="0 0 512 512" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
.st0{fill:#000000;}
|
||||
]]>
|
||||
</style>
|
||||
<g>
|
||||
<path class="st0" d="M485.016,220.691c12.422-8.422,22.188-57.266,7.797-87.016c-26.859,28.125-80.109,49.859-142,72.922
|
||||
c-64.656,24.078-71.531,41.859-94.813,42.172c-23.297-0.313-30.156-18.094-94.813-42.172c-61.891-23.063-115.141-44.797-142-72.922
|
||||
c-14.406,29.75-4.625,78.594,7.781,87.016C13.484,214.332,0,210.051,0,210.051s3.813,68.172,33.25,106.563
|
||||
c24.953,32.547,86.984,72.906,145.828,58.828c62.219-14.875,62.344-41.406,76.922-41.266c14.563-0.141,14.688,26.391,76.906,41.266
|
||||
c58.844,14.078,120.875-26.281,145.844-58.828C508.156,278.223,512,210.051,512,210.051S498.5,214.332,485.016,220.691z
|
||||
M131.438,318.848c-25.109-11.641-46.063-37.422-43.188-73.891c12.813,5.078,48.844,9.406,69.094,17.281
|
||||
c23,8.953,46.031,23.984,48.922,41.25C205.313,317.879,170.75,337.066,131.438,318.848z M380.563,318.848
|
||||
c-39.344,18.219-73.875-0.969-74.828-15.359c2.891-17.266,25.891-32.297,48.922-41.25c20.25-7.875,56.281-12.203,69.094-17.281
|
||||
C426.625,281.426,405.656,307.207,380.563,318.848z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,30 @@
|
||||
provider: fakegpt
|
||||
label:
|
||||
en_US: FakeGPT
|
||||
description:
|
||||
en_US: FakeGPT is a fake model provider that does not actually connect to any model service. It is useful for testing and development purposes.
|
||||
icon_small:
|
||||
en_US: icon_s_en.svg
|
||||
icon_large:
|
||||
en_US: icon_l_en.svg
|
||||
background: "#FCFDFF"
|
||||
help:
|
||||
title:
|
||||
en_US: Get your Access Details from Google
|
||||
url:
|
||||
en_US: https://apipark.com
|
||||
supported_model_types:
|
||||
- llm
|
||||
- text-embedding
|
||||
configurate_methods:
|
||||
- predefined-model
|
||||
provider_credential_schema:
|
||||
credential_form_schemas:
|
||||
- variable: apikey
|
||||
label:
|
||||
en_US: API Key
|
||||
type: secret-input
|
||||
required: true
|
||||
placeholder:
|
||||
en_US: Enter your API key
|
||||
address: https://apipark.com
|
||||
@@ -0,0 +1,51 @@
|
||||
model: fakegpt-1.0
|
||||
label:
|
||||
en_US: FakeGPT 1.0
|
||||
model_type: llm
|
||||
features:
|
||||
- agent-thought
|
||||
- vision
|
||||
model_properties:
|
||||
mode: chat
|
||||
context_size: 200000
|
||||
parameter_rules:
|
||||
- name: max_tokens
|
||||
use_template: max_tokens
|
||||
required: true
|
||||
type: int
|
||||
default: 4096
|
||||
min: 1
|
||||
max: 4096
|
||||
help:
|
||||
zh_Hans: 停止前生成的最大令牌数。
|
||||
en_US: The maximum number of tokens to generate before stopping.
|
||||
- name: temperature
|
||||
use_template: temperature
|
||||
required: false
|
||||
type: float
|
||||
default: 1
|
||||
min: 0.0
|
||||
max: 1.0
|
||||
help:
|
||||
zh_Hans: 生成内容的随机性。
|
||||
en_US: The amount of randomness injected into the response.
|
||||
- name: top_p
|
||||
required: false
|
||||
type: float
|
||||
default: 0.999
|
||||
min: 0.000
|
||||
max: 1.000
|
||||
help:
|
||||
zh_Hans: 在核采样中,按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。
|
||||
en_US: In nucleus sampling, computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both.
|
||||
- name: top_k
|
||||
required: false
|
||||
type: int
|
||||
default: 0
|
||||
min: 0
|
||||
# tip docs from aws has error, max value is 500
|
||||
max: 500
|
||||
help:
|
||||
zh_Hans: 对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。
|
||||
en_US: Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses.
|
||||
|
||||
@@ -24,7 +24,7 @@ parameter_rules:
|
||||
use_template: presence_penalty
|
||||
- name: frequency_penalty
|
||||
use_template: frequency_penalty
|
||||
- name: max_output_tokens
|
||||
- name: max_tokens
|
||||
use_template: max_tokens
|
||||
required: true
|
||||
default: 2048
|
||||
|
||||
@@ -23,7 +23,7 @@ parameter_rules:
|
||||
use_template: presence_penalty
|
||||
- name: frequency_penalty
|
||||
use_template: frequency_penalty
|
||||
- name: max_output_tokens
|
||||
- name: max_tokens
|
||||
use_template: max_tokens
|
||||
required: true
|
||||
default: 8192
|
||||
|
||||
@@ -24,7 +24,7 @@ parameter_rules:
|
||||
use_template: presence_penalty
|
||||
- name: frequency_penalty
|
||||
use_template: frequency_penalty
|
||||
- name: max_output_tokens
|
||||
- name: max_tokens
|
||||
use_template: max_tokens
|
||||
required: true
|
||||
default: 8192
|
||||
|
||||
@@ -24,7 +24,7 @@ parameter_rules:
|
||||
use_template: presence_penalty
|
||||
- name: frequency_penalty
|
||||
use_template: frequency_penalty
|
||||
- name: max_output_tokens
|
||||
- name: max_tokens
|
||||
use_template: max_tokens
|
||||
required: true
|
||||
default: 8192
|
||||
|
||||
@@ -24,7 +24,7 @@ parameter_rules:
|
||||
use_template: presence_penalty
|
||||
- name: frequency_penalty
|
||||
use_template: frequency_penalty
|
||||
- name: max_output_tokens
|
||||
- name: max_tokens
|
||||
use_template: max_tokens
|
||||
required: true
|
||||
default: 8192
|
||||
|
||||
@@ -24,7 +24,7 @@ parameter_rules:
|
||||
use_template: presence_penalty
|
||||
- name: frequency_penalty
|
||||
use_template: frequency_penalty
|
||||
- name: max_output_tokens
|
||||
- name: max_tokens
|
||||
use_template: max_tokens
|
||||
required: true
|
||||
default: 8192
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ parameter_rules:
|
||||
use_template: presence_penalty
|
||||
- name: frequency_penalty
|
||||
use_template: frequency_penalty
|
||||
- name: max_output_tokens
|
||||
- name: max_tokens
|
||||
use_template: max_tokens
|
||||
required: true
|
||||
default: 8192
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ parameter_rules:
|
||||
use_template: presence_penalty
|
||||
- name: frequency_penalty
|
||||
use_template: frequency_penalty
|
||||
- name: max_output_tokens
|
||||
- name: max_tokens
|
||||
use_template: max_tokens
|
||||
required: true
|
||||
default: 8192
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
// These should be set via go build -ldflags -X 'xxxx'.
|
||||
@@ -20,7 +20,7 @@ var profileInfo []byte
|
||||
|
||||
func init() {
|
||||
buffer := &bytes.Buffer{}
|
||||
fmt.Fprintf(buffer, "Apinto version: %s\n", Version)
|
||||
fmt.Fprintf(buffer, "APIPark version: %s\n", Version)
|
||||
fmt.Fprintf(buffer, "Golang version: %s\n", goVersion)
|
||||
fmt.Fprintf(buffer, "Git commit hash: %s\n", gitCommit)
|
||||
fmt.Fprintf(buffer, "Built on: %s\n", BuildTime)
|
||||
|
||||
@@ -319,12 +319,12 @@ func (i *imlInitController) OnInit() {
|
||||
}
|
||||
func (i *imlInitController) createAIService(ctx context.Context, teamID string, input *service_dto.CreateService) error {
|
||||
|
||||
providerId := "openai"
|
||||
err := i.providerModule.UpdateProviderConfig(ctx, "openai", &ai_dto.UpdateConfig{
|
||||
Config: "{\n \"openai_api_base\": \"API Base\",\n \"openai_api_key\": \"API Key\",\n \"openai_organization\": \"Organization\"\n}",
|
||||
providerId := "fakegpt"
|
||||
err := i.providerModule.UpdateProviderConfig(ctx, providerId, &ai_dto.UpdateConfig{
|
||||
Config: "{\n \"apikey\": \"xxx\" \n}",
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("update openai config error: %v", err)
|
||||
return fmt.Errorf("update %s config error: %v", providerId, err)
|
||||
}
|
||||
input.Provider = &providerId
|
||||
if input.Id == "" {
|
||||
|
||||
+12
-5
@@ -1,10 +1,17 @@
|
||||
# 部署
|
||||
|
||||
## 安装依赖
|
||||
建议使用pnpm
|
||||
`npm install -g pnpm`
|
||||
使用pnpm安装依赖
|
||||
`pnpm install`
|
||||
建议使用 pnpm
|
||||
```
|
||||
npm install -g pnpm
|
||||
```
|
||||
|
||||
使用pnpm安装依赖
|
||||
```
|
||||
pnpm install
|
||||
```
|
||||
|
||||
## 编译
|
||||
`pnpm run build`
|
||||
```
|
||||
pnpm run build
|
||||
```
|
||||
|
||||
@@ -1,19 +1,15 @@
|
||||
import {
|
||||
ConfigProvider,
|
||||
Dropdown,
|
||||
MenuProps,
|
||||
App,
|
||||
Button} from 'antd';
|
||||
Button,
|
||||
ConfigProvider,
|
||||
Dropdown} from 'antd';
|
||||
import { Outlet, useLocation, useNavigate} from "react-router-dom";
|
||||
import Logo from '@common/assets/layout-logo.png';
|
||||
import AvatarPic from '@common/assets/default-avatar.png'
|
||||
import {Outlet, useLocation, useNavigate} from "react-router-dom";
|
||||
import { useEffect, useMemo, useState} from "react";
|
||||
import { useEffect, useMemo, useState} from "react";
|
||||
import { useGlobalContext } from '@common/contexts/GlobalStateContext.tsx';
|
||||
import { PERMISSION_DEFINITION } from '@common/const/permissions.ts';
|
||||
import {
|
||||
ProConfigProvider,
|
||||
ProLayout,
|
||||
} from '@ant-design/pro-components';
|
||||
import { BasicResponse, RESPONSE_TIPS, routerKeyMap, STATUS_CODE } from '@common/const/const.tsx';
|
||||
import { UserInfoType } from '@common/const/type.ts';
|
||||
import { useFetch } from '@common/hooks/http.ts';
|
||||
@@ -21,6 +17,7 @@ import { ProjectFilled } from '@ant-design/icons';
|
||||
import { getNavItem } from '@common/utils/navigation';
|
||||
import { Icon } from '@iconify/react';
|
||||
import { $t } from '@common/locales';
|
||||
import { ProConfigProvider, ProLayout } from '@ant-design/pro-components';
|
||||
import LanguageSetting from './LanguageSetting';
|
||||
|
||||
const APP_MODE = import.meta.env.VITE_APP_MODE;
|
||||
@@ -41,9 +38,8 @@ const themeToken = {
|
||||
const navigator = useNavigate()
|
||||
const location = useLocation()
|
||||
const currentUrl = location.pathname
|
||||
const { state,accessData,checkPermission,accessInit} = useGlobalContext()
|
||||
const [pathname, setPathname] = useState(currentUrl);
|
||||
const mainPage = project === 'core' ?'/service/list':'/serviceHub/list'
|
||||
const { state,accessData,checkPermission,accessInit,dispatch,resetAccess,getGlobalAccessData} = useGlobalContext()
|
||||
const [pathname, setPathname] = useState(currentUrl); const mainPage = project === 'core' ?'/service/list':'/serviceHub/list'
|
||||
|
||||
const TOTAL_MENU_ITEMS:MenuProps['items'] = useMemo(() => [
|
||||
getNavItem($t('工作空间'), 'workspace','/guide/page',<Icon icon="ic:baseline-space-dashboard" width="18" height="18"/>, [
|
||||
@@ -126,7 +122,6 @@ const themeToken = {
|
||||
|
||||
|
||||
const { message } = App.useApp()
|
||||
const { dispatch,resetAccess,getGlobalAccessData} = useGlobalContext()
|
||||
const [userInfo,setUserInfo] = useState<UserInfoType>()
|
||||
const {fetchData} = useFetch()
|
||||
const navigate = useNavigate();
|
||||
@@ -163,8 +158,8 @@ const themeToken = {
|
||||
})
|
||||
}
|
||||
|
||||
const items: MenuProps['items'] = [
|
||||
{
|
||||
const items: MenuProps['items'] = useMemo(() => [
|
||||
userInfo?.type !== 'guest' && {
|
||||
key: '2',
|
||||
label: (
|
||||
<Button key="changePsw" type="text" className="flex items-center p-0 bg-transparent border-none " onClick={()=>navigator('/userProfile/changepsw')}>
|
||||
@@ -178,7 +173,7 @@ const themeToken = {
|
||||
{$t('退出登录')}
|
||||
</Button>)
|
||||
},
|
||||
];
|
||||
].filter(Boolean), [userInfo]);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -137,6 +137,28 @@ export const TranslateWord = ()=>{
|
||||
{$t('鉴权数量')}
|
||||
{$t('列表')}
|
||||
{$t('块')}
|
||||
{$t('HTTP 请求头')}
|
||||
{$t('全等匹配')}
|
||||
{$t('前缀匹配')}
|
||||
{$t('后缀匹配')}
|
||||
{$t('子串匹配')}
|
||||
{$t('非等匹配')}
|
||||
{$t('空值匹配')}
|
||||
{$t('存在匹配')}
|
||||
{$t('不存在匹配')}
|
||||
{$t('区分大小写的正则匹配')}
|
||||
{$t('不区分大小写的正则匹配')}
|
||||
{$t('任意匹配')}
|
||||
{$t('驳回')}
|
||||
{$t('已订阅')}
|
||||
{$t('取消申请')}
|
||||
{$t('透传客户端请求 Host')}
|
||||
{$t('使用上游服务 Host')}
|
||||
{$t('重写 Host')}
|
||||
{$t('动态服务发现')}
|
||||
{$t('地址')}
|
||||
{$t('新增')}
|
||||
{$t('申请方消费者')}
|
||||
|
||||
</>
|
||||
)
|
||||
|
||||
@@ -7,6 +7,8 @@ export type UserInfoType = {
|
||||
email: string
|
||||
phone: string
|
||||
avatar: string
|
||||
type:string
|
||||
|
||||
}
|
||||
|
||||
export type UserProfileProps = {
|
||||
|
||||
@@ -212,6 +212,28 @@
|
||||
"鉴权数量": "Ka701316",
|
||||
"列表": "K9eaa2eb6",
|
||||
"块": "Kfaec39e9",
|
||||
"HTTP 请求头": "K76036e25",
|
||||
"全等匹配": "K44607e3f",
|
||||
"前缀匹配": "Kc287500a",
|
||||
"后缀匹配": "Kfc0b1147",
|
||||
"子串匹配": "Ka4a92043",
|
||||
"非等匹配": "K30b2e44f",
|
||||
"空值匹配": "Kb1587991",
|
||||
"存在匹配": "K1e97dbd8",
|
||||
"不存在匹配": "Kc8ee3e62",
|
||||
"区分大小写的正则匹配": "K87c5a801",
|
||||
"不区分大小写的正则匹配": "K95f062f1",
|
||||
"任意匹配": "Kfbd230a5",
|
||||
"驳回": "Kd85208a3",
|
||||
"已订阅": "Kad6aa439",
|
||||
"取消申请": "K9a68443b",
|
||||
"透传客户端请求 Host": "Kaeba0229",
|
||||
"使用上游服务 Host": "K6d7e2fd0",
|
||||
"重写 Host": "K31332633",
|
||||
"动态服务发现": "K2c2bc64f",
|
||||
"地址": "K78b1ca25",
|
||||
"新增": "K1644b775",
|
||||
"申请方消费者": "Kec91f0db",
|
||||
"暂无操作权限,请联系管理员分配。": "K23fda291",
|
||||
"微信小程序": "K4618cb0a",
|
||||
"获取文件,需填路径": "Ka854f511",
|
||||
@@ -627,10 +649,10 @@
|
||||
"搜索服务": "K66ea2f0",
|
||||
"审核中": "K8adf7f8b",
|
||||
"添加消费者": "K84c4dc71",
|
||||
"暂无服务描述": "Ka4b45550",
|
||||
"暂无消费者描述": "Kc3b7bfa8",
|
||||
"创建并管理自己的消费者实体,每个消费者可以订阅多个API服务,确保在调用之前已获得相应权限。你可以为消费者生成 API 密钥等鉴权方式,用于安全地调用 API 服务": "K5c4e2865",
|
||||
"订阅的服务数量:已通过 (0) 个,申请中 (1) 个": "K3c7b175f",
|
||||
"输入名称、ID 查找服务": "K40a89bd8",
|
||||
"输入名称、ID 查找消费者": "K3a6f905d",
|
||||
"退出测试": "Kbe3e9335",
|
||||
"服务市场": "K370a3eb2",
|
||||
"服务详情": "Kf7ec36d",
|
||||
@@ -645,6 +667,7 @@
|
||||
"版本": "K81634069",
|
||||
"更新时间": "Keefda53d",
|
||||
"无标签": "K96a2f1c8",
|
||||
"暂无服务描述": "Ka4b45550",
|
||||
"API 数量": "K72b0c0b3",
|
||||
"接入消费者数量": "K70b79760",
|
||||
"关联标签": "K96059c69",
|
||||
|
||||
@@ -580,8 +580,8 @@
|
||||
"Kd7d84192": "Name",
|
||||
"Kc88e03b6": "Team Roles",
|
||||
"Ke08ff808": "Addition Date",
|
||||
"K19a3ebe0": "Successful Requests",
|
||||
"Kcaa8259": "Successful Forwards",
|
||||
"K19a3ebe0": "Success",
|
||||
"Kcaa8259": "Success",
|
||||
"K17f93984": "API",
|
||||
"K888f038f": "Failed Status Code Count",
|
||||
"Ke792d01c": "Service Association",
|
||||
@@ -607,7 +607,7 @@
|
||||
"Ke108c369": "Success",
|
||||
"K9168d3e": "Redirecting to Login Page",
|
||||
"K2f8a7ab7": "Review Comments Not Provided",
|
||||
"Kb858d78a": "Copy Successful",
|
||||
"Kb858d78a": "Copied",
|
||||
"K26e85d15": "Copy Failed, Please Copy Manually",
|
||||
"Kd60d204": "Service Team",
|
||||
"K823bfe63": "Online",
|
||||
@@ -654,5 +654,29 @@
|
||||
"K6e32a344": "Number of Services",
|
||||
"Ka701316": "Number of Auths",
|
||||
"K9eaa2eb6": "List",
|
||||
"Kfaec39e9": "Block"
|
||||
"Kfaec39e9": "Block",
|
||||
"Kc3b7bfa8": "No Consumer Description",
|
||||
"K3a6f905d": "Enter Name, ID to Search Consumer",
|
||||
"K76036e25": "HTTP Request Header",
|
||||
"K44607e3f": "Exact Match",
|
||||
"Kc287500a": "Prefix Match",
|
||||
"Kfc0b1147": "Suffix Match",
|
||||
"Ka4a92043": "Substring Match",
|
||||
"K30b2e44f": "Non-Exact Match",
|
||||
"Kb1587991": "Null Match",
|
||||
"K87c5a801": "Case-Sensitive Regex Match",
|
||||
"K95f062f1": "Case-Insensitive Regex Match",
|
||||
"Kfbd230a5": "Any Match",
|
||||
"Kd85208a3": "Reject",
|
||||
"Kad6aa439": "Subscribed",
|
||||
"K9a68443b": "Cancel Request",
|
||||
"Kaeba0229": "Pass-through Client Request Host",
|
||||
"K6d7e2fd0": "Use Upstream Service Host",
|
||||
"K31332633": "Rewrite Host",
|
||||
"K2c2bc64f": "Dynamic Service Discovery",
|
||||
"K78b1ca25": "Address",
|
||||
"K1644b775": "Add",
|
||||
"Kc8ee3e62": "Non-Existence",
|
||||
"K1e97dbd8": "Existence",
|
||||
"Kec91f0db": "Applicant Consumer"
|
||||
}
|
||||
|
||||
@@ -672,8 +672,33 @@
|
||||
"K67b530f": "コンシューマー名",
|
||||
"K11f34de": "コンシューマー ID",
|
||||
"Kc01002": "コンシューマーを削除",
|
||||
"K84c4dc71": "コンシューマーエンティティを作成および管理し、各コンシューマーは複数の API サービスにサブスクライブできます。呼び出し前に適切な権限が付与されていることを確認してください。コンシューマー用に API キーなどの認証方法を生成して、安全に API サービスを呼び出せます。",
|
||||
"K40a89bd8": "名前または ID を入力してサービスを検索",
|
||||
"Kba74f26d": "コンシューマーを接続",
|
||||
"K70b79760": "接続コンシューマー数"
|
||||
"K70b79760": "接続コンシューマー数",
|
||||
"K5c4e2865": "コンシューマーエンティティを作成および管理し、各コンシューマーは複数の API サービスにサブスクライブできます。呼び出し前に適切な権限が付与されていることを確認してください。コンシューマー用に API キーなどの認証方法を生成して、安全に API サービスを呼び出せます。",
|
||||
"K84c4dc71": "コンシューマーを追加",
|
||||
"Kc3b7bfa8": "コンシューマーの説明がありません",
|
||||
"K3a6f905d": "名前、IDを入力してコンシューマーを検索",
|
||||
"K76036e25": "HTTPリクエストヘッダー",
|
||||
"K44607e3f": "完全一致",
|
||||
"Kc287500a": "プレフィックス一致",
|
||||
"Kfc0b1147": "サフィックス一致",
|
||||
"Ka4a92043": "部分一致",
|
||||
"K30b2e44f": "非完全一致",
|
||||
"Kb1587991": "ヌル一致",
|
||||
"K87c5a801": "大文字小文字を区別する正規表現一致",
|
||||
"K95f062f1": "大文字小文字を区別しない正規表現一致",
|
||||
"Kfbd230a5": "任意一致",
|
||||
"Kd85208a3": "拒否",
|
||||
"Kad6aa439": "申し込み済み",
|
||||
"K9a68443b": "申し込み取消",
|
||||
"Kaeba0229": "クライアントリクエストホストのパススルー",
|
||||
"K6d7e2fd0": "上位サービスホストの使用",
|
||||
"K31332633": "ホストの書き換え",
|
||||
"K2c2bc64f": "動的サービス発見",
|
||||
"K78b1ca25": "アドレス",
|
||||
"K1644b775": "追加",
|
||||
"Kc8ee3e62": "存在しない",
|
||||
"K1e97dbd8": "存在する",
|
||||
"Kec91f0db": "申請側コンシューマー"
|
||||
}
|
||||
|
||||
@@ -1,32 +1 @@
|
||||
{
|
||||
"K7acfcfad": "消费者",
|
||||
"Kc8054dba": "消费者开发者",
|
||||
"Keb1673a6": "消费者管理员",
|
||||
"K1fc2cc28": "无需审核:允许任何消费者调用该服务",
|
||||
"K8dabb98e": "人工审核:仅允许通过人工审核的消费者调用该服务",
|
||||
"K7c1fb123": "申请方-消费者",
|
||||
"K93c2696e": "上线结果",
|
||||
"K6e32a344": "订阅服务数量",
|
||||
"Ka701316": "鉴权数量",
|
||||
"K9eaa2eb6": "列表",
|
||||
"Kfaec39e9": "块",
|
||||
"Kdea9a418": "为了安全地调用 API,你需要创建一个消费者以及Token。",
|
||||
"Keee27105": "团队中包含了人员、消费者和服务,不同团队之间的消费者和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。",
|
||||
"Kaa717866": "提供服务的团队可以审核来自其他团队的订阅申请,审核通过后的消费者才可发起 API 请求。",
|
||||
"Kd2c34e2c": "AI 服务",
|
||||
"K62840d62": "REST 服务",
|
||||
"K4c72fb6f": "设置团队和成员,然后你可以在团队内创建服务和消费者、订阅API,成员只能看到所属团队内的服务和消费者。",
|
||||
"K61cca533": "消费者调用统计",
|
||||
"Kdfff59d4": "请选择消费者",
|
||||
"K386857bd": "消费者调用量 Top10",
|
||||
"Kb684c806": "搜索或选择消费者",
|
||||
"Ke0fbd1c8": "消费者管理",
|
||||
"K67b530f": "消费者名称",
|
||||
"K11f34de": "消费者 ID",
|
||||
"Kc01002": "删除消费者",
|
||||
"K84c4dc71": "添加消费者",
|
||||
"K5c4e2865": "创建并管理自己的消费者实体,每个消费者可以订阅多个API服务,确保在调用之前已获得相应权限。你可以为消费者生成 API 密钥等鉴权方式,用于安全地调用 API 服务",
|
||||
"K40a89bd8": "输入名称、ID 查找服务",
|
||||
"Kba74f26d": "接入消费者",
|
||||
"K70b79760": "接入消费者数量"
|
||||
}
|
||||
{}
|
||||
@@ -1,7 +1,26 @@
|
||||
{
|
||||
"K93c2696e": "上线结果",
|
||||
"K6e32a344": "订阅服务数量",
|
||||
"Ka701316": "鉴权数量",
|
||||
"K9eaa2eb6": "列表",
|
||||
"Kfaec39e9": "块"
|
||||
"K76036e25": "HTTP 请求头",
|
||||
"K44607e3f": "全等匹配",
|
||||
"Kc287500a": "前缀匹配",
|
||||
"Kfc0b1147": "后缀匹配",
|
||||
"Ka4a92043": "子串匹配",
|
||||
"K30b2e44f": "非等匹配",
|
||||
"Kb1587991": "空值匹配",
|
||||
"K1e97dbd8": "存在匹配",
|
||||
"Kc8ee3e62": "不存在匹配",
|
||||
"K87c5a801": "区分大小写的正则匹配",
|
||||
"K95f062f1": "不区分大小写的正则匹配",
|
||||
"Kfbd230a5": "任意匹配",
|
||||
"Kd85208a3": "驳回",
|
||||
"Kad6aa439": "已订阅",
|
||||
"K9a68443b": "取消申请",
|
||||
"Kaeba0229": "透传客户端请求 Host",
|
||||
"K6d7e2fd0": "使用上游服务 Host",
|
||||
"K31332633": "重写 Host",
|
||||
"K2c2bc64f": "动态服务发现",
|
||||
"K78b1ca25": "地址",
|
||||
"K1644b775": "新增",
|
||||
"Kec91f0db": "申请方消费者",
|
||||
"Kc3b7bfa8": "暂无消费者描述",
|
||||
"K3a6f905d": "输入名称、ID 查找消费者"
|
||||
}
|
||||
@@ -1,32 +1 @@
|
||||
{
|
||||
"K7acfcfad": "消费者",
|
||||
"Kc8054dba": "消费者开发者",
|
||||
"Keb1673a6": "消费者管理员",
|
||||
"K1fc2cc28": "无需审核:允许任何消费者调用该服务",
|
||||
"K8dabb98e": "人工审核:仅允许通过人工审核的消费者调用该服务",
|
||||
"K7c1fb123": "申请方-消费者",
|
||||
"K93c2696e": "上线结果",
|
||||
"K6e32a344": "订阅服务数量",
|
||||
"Ka701316": "鉴权数量",
|
||||
"K9eaa2eb6": "列表",
|
||||
"Kfaec39e9": "块",
|
||||
"Kdea9a418": "为了安全地调用 API,你需要创建一个消费者以及Token。",
|
||||
"Keee27105": "团队中包含了人员、消费者和服务,不同团队之间的消费者和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。",
|
||||
"Kaa717866": "提供服务的团队可以审核来自其他团队的订阅申请,审核通过后的消费者才可发起 API 请求。",
|
||||
"Kd2c34e2c": "AI 服务",
|
||||
"K62840d62": "REST 服务",
|
||||
"K4c72fb6f": "设置团队和成员,然后你可以在团队内创建服务和消费者、订阅API,成员只能看到所属团队内的服务和消费者。",
|
||||
"K61cca533": "消费者调用统计",
|
||||
"Kdfff59d4": "请选择消费者",
|
||||
"K386857bd": "消费者调用量 Top10",
|
||||
"Kb684c806": "搜索或选择消费者",
|
||||
"Ke0fbd1c8": "消费者管理",
|
||||
"K67b530f": "消费者名称",
|
||||
"K11f34de": "消费者 ID",
|
||||
"Kc01002": "删除消费者",
|
||||
"K84c4dc71": "添加消费者",
|
||||
"K5c4e2865": "创建并管理自己的消费者实体,每个消费者可以订阅多个API服务,确保在调用之前已获得相应权限。你可以为消费者生成 API 密钥等鉴权方式,用于安全地调用 API 服务",
|
||||
"K40a89bd8": "输入名称、ID 查找服务",
|
||||
"Kba74f26d": "接入消费者",
|
||||
"K70b79760": "接入消费者数量"
|
||||
}
|
||||
{}
|
||||
@@ -1,24 +1,3 @@
|
||||
{
|
||||
"Kfe93ef35": "Application",
|
||||
"Kffd7e274": "No Review: All applications are allowed to subscribe to this service",
|
||||
"K8a8b13e4": "Manual Review: Only reviewed and approved applications can subscribe to this service",
|
||||
"K9bdd8403": "To securely call APIs, you need to create an application and a token.",
|
||||
"Kc8239422": "Teams include personnel, applications, and services. Data between different teams is isolated, and can be used to manage different departments/project teams/teams within the enterprise.",
|
||||
"Ka0a8840a": "Review subscription requests from other applications. Only approved requests can initiate API calls.",
|
||||
"K5ece3bac": "Set up teams and members. You can then create services and applications, subscribe to APIs within the team. Members can only see services and applications within their team.",
|
||||
"K1512e983": "Application Call Statistics",
|
||||
"Kb4d2007f": "Please Select Application",
|
||||
"Kc0915603": "Application Top 10",
|
||||
"Kd8a7a689": "Search or Select Application",
|
||||
"Kb7e869a4": "Application Settings",
|
||||
"K5168eb63": "Application Name",
|
||||
"K546e46f": "Application ID",
|
||||
"K95764d1d": "Delete Application",
|
||||
"K667bbbe7": "Add Application",
|
||||
"K8723422e": "Access Application",
|
||||
"K93d5a66e": "Number of Access Applications",
|
||||
"K216a1ac7": "Application Developer",
|
||||
"K27924db": "Application Administrator",
|
||||
"Kd55c6887": "Review",
|
||||
"K831aa6c0": "Applicant - Application"
|
||||
"K40a89bd8": "Enter Name, ID to Search Member"
|
||||
}
|
||||
@@ -20,5 +20,6 @@
|
||||
"K216a1ac7": "アプリケーション開発者",
|
||||
"K27924db": "アプリケーション管理者",
|
||||
"Kd55c6887": "レビュー",
|
||||
"K831aa6c0": "申請元-アプリケーション"
|
||||
"K831aa6c0": "申請元-アプリケーション",
|
||||
"K40a89bd8": "名前または ID を入力してサービスを検索"
|
||||
}
|
||||
@@ -20,5 +20,6 @@
|
||||
"K216a1ac7": "消费者开发者",
|
||||
"K27924db": "消费者管理员",
|
||||
"Kd55c6887": "审核",
|
||||
"K831aa6c0": "申请方-消费者"
|
||||
"K831aa6c0": "申请方-消费者",
|
||||
"K40a89bd8": "输入名称、ID 查找服务"
|
||||
}
|
||||
@@ -20,5 +20,6 @@
|
||||
"K216a1ac7": "應用程式開發者",
|
||||
"K27924db": "應用程式管理員",
|
||||
"Kd55c6887": "審核",
|
||||
"K831aa6c0": "申請方-應用程式"
|
||||
"K831aa6c0": "申請方-應用程式",
|
||||
"K40a89bd8": "輸入名稱、ID 查找服務"
|
||||
}
|
||||
@@ -676,5 +676,29 @@
|
||||
"K5c4e2865": "創建並管理自己的消費者實體,每個消費者可以訂閱多個API服務,確保在調用之前已獲得相應權限。你可以為消費者生成 API 密鑰等鑒權方式,用於安全地調用 API 服務",
|
||||
"K40a89bd8": "輸入名稱、ID 查找服務",
|
||||
"Kba74f26d": "接入消費者",
|
||||
"K70b79760": "接入消費者數量"
|
||||
"K70b79760": "接入消費者數量",
|
||||
"Kc3b7bfa8": "暫無消費者描述",
|
||||
"K3a6f905d": "輸入名稱、ID 查找消費者",
|
||||
"K76036e25": "HTTP請求頭",
|
||||
"K44607e3f": "全等匹配",
|
||||
"Kc287500a": "前綴匹配",
|
||||
"Kfc0b1147": "後綴匹配",
|
||||
"Ka4a92043": "子串匹配",
|
||||
"K30b2e44f": "非等匹配",
|
||||
"Kb1587991": "空值匹配",
|
||||
"K87c5a801": "區分大小寫的正則匹配",
|
||||
"K95f062f1": "不區分大小寫的正則匹配",
|
||||
"Kfbd230a5": "任意匹配",
|
||||
"Kd85208a3": "駁回",
|
||||
"Kad6aa439": "已訂閱",
|
||||
"K9a68443b": "取消申請",
|
||||
"Kaeba0229": "透傳客戶端請求Host",
|
||||
"K6d7e2fd0": "使用上游服務Host",
|
||||
"K31332633": "重寫Host",
|
||||
"K2c2bc64f": "動態服務發現",
|
||||
"K78b1ca25": "位址",
|
||||
"K1644b775": "新增",
|
||||
"Kc8ee3e62": "不存在匹配",
|
||||
"K1e97dbd8": "存在匹配",
|
||||
"Kec91f0db": "申請方消費者"
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ const AiServiceInsideRouterCreate = () => {
|
||||
</Form.Item>
|
||||
|
||||
|
||||
<Form.Item label={$t("请求路径")}>
|
||||
<Form.Item className="flex-1" label={$t("请求路径")}>
|
||||
<Space.Compact block>
|
||||
<Form.Item
|
||||
name="pathMatch"
|
||||
@@ -276,7 +276,7 @@ const AiServiceInsideRouterCreate = () => {
|
||||
}]}
|
||||
noStyle
|
||||
>
|
||||
<Input prefix={(prefixForce ? `${apiPrefix}/` :"/")} className="w-INPUT_NORMAL"
|
||||
<Input prefix={(prefixForce ? `${apiPrefix}/` :"/")}
|
||||
placeholder={$t(PLACEHOLDER.input)} onChange={(e)=>{
|
||||
if((e.target.value as string).endsWith('/*')){
|
||||
form.setFieldValue('path',e.target.value.slice(0,-2))
|
||||
|
||||
@@ -106,10 +106,7 @@ const AiSettingModalContent = forwardRef<AiSettingModalContentHandle,AiSettingMo
|
||||
label:<div className="flex items-center gap-[10px]">
|
||||
<span>{x.id}</span>
|
||||
{x?.scopes?.map(s=><Tag >{s?.toLocaleUpperCase()}</Tag>)}
|
||||
</div>}))}
|
||||
onChange={(e)=>{
|
||||
form.setFieldValue('config',llmList?.find(x=>x.id===e)?.config)
|
||||
}}>
|
||||
</div>}))}>
|
||||
</Select>
|
||||
</Form.Item>
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ const SystemList:FC = ()=>{
|
||||
|
||||
<InsidePage
|
||||
pageTitle={$t('服务')}
|
||||
description={'APIPark '+$t("服务提供了高性能 API 网关,并且可以无缝接入多种大型 AI 模型,并将这些 AI 能力打包成 API 进行调用,从而大幅简化了 AI 模型的使用门槛。同时,我们的平台提供了完善的 API 管理功能,支持 API 的创建、监控、访问控制等,保障开发者可以高效、安全地开发和管理 API 服务。")}
|
||||
description={$t("服务提供了高性能 API 网关,并且可以无缝接入多种大型 AI 模型,并将这些 AI 能力打包成 API 进行调用,从而大幅简化了 AI 模型的使用门槛。同时,我们的平台提供了完善的 API 管理功能,支持 API 的创建、监控、访问控制等,保障开发者可以高效、安全地开发和管理 API 服务。")}
|
||||
showBorder={false}
|
||||
contentClassName=" pr-PAGE_INSIDE_X pb-PAGE_INSIDE_B"
|
||||
>
|
||||
|
||||
@@ -196,7 +196,7 @@ useEffect(() => {
|
||||
item.type === 'addNewItem' ?<WithPermission access="team.application.application.add" showDisabled={false}><Card className="shadow-[0_5px_10px_0_rgba(0,0,0,0.05)] rounded-[10px] overflow-visible cursor-pointer h-[180px] transition duration-500 hover:shadow-[0_5px_20px_0_rgba(0,0,0,0.15)] hover:scale-[1.05]" classNames={{body:'h-[180px] flex items-center justify-center cursor-pointer'}} onClick={()=>{openModal('add')}}>
|
||||
<div className="flex items-center"><Icon icon="ic:baseline-add" width="18" height="18"/><span>{$t('添加消费者')}</span></div>
|
||||
</Card></WithPermission> : <Card title={CardTitle(item)} className="shadow-[0_5px_10px_0_rgba(0,0,0,0.05)] rounded-[10px] overflow-visible cursor-pointer h-[180px] transition duration-500 hover:shadow-[0_5px_20px_0_rgba(0,0,0,0.15)] hover:scale-[1.05]" classNames={{header:'border-b-[0px] p-[20px] ', body:"pt-0"}} onClick={()=>{setAppName(item.name);navigateTo(`/consumer/${teamId}/inside/${item.id}/service`)}}>
|
||||
<span className="line-clamp-3 break-all">{item.description || $t('暂无服务描述')}</span>
|
||||
<span className="line-clamp-3 break-all">{item.description || $t('暂无消费者描述')}</span>
|
||||
|
||||
</Card>}</div>
|
||||
);
|
||||
@@ -293,8 +293,8 @@ const TableArea = memo(({language, getServiceList, addNewApp, setTableHttpReload
|
||||
id="service_hub_list"
|
||||
columns={[...columns]}
|
||||
request={()=>getServiceList()}
|
||||
addNewBtnTitle={$t("添加服务")}
|
||||
searchPlaceholder={$t("输入名称、ID 查找服务")}
|
||||
addNewBtnTitle={$t("添加消费者")}
|
||||
searchPlaceholder={$t("输入名称、ID 查找消费者")}
|
||||
onAddNewBtnClick={addNewApp}
|
||||
onChange={() => {
|
||||
setTableHttpReload(false)
|
||||
|
||||
@@ -13,7 +13,7 @@ require (
|
||||
github.com/gin-gonic/gin v1.10.0
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/influxdata/influxdb-client-go/v2 v2.14.0
|
||||
github.com/urfave/cli/v2 v2.27.2
|
||||
github.com/urfave/cli v1.22.16
|
||||
golang.org/x/crypto v0.24.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
gorm.io/gorm v1.25.5
|
||||
@@ -26,7 +26,7 @@ require (
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/cloudwego/base64x v0.1.4 // indirect
|
||||
github.com/cloudwego/iasm v0.2.0 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/dustin/go-humanize v1.0.0 // indirect
|
||||
github.com/ghodss/yaml v1.0.0 // indirect
|
||||
@@ -62,7 +62,6 @@ require (
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||
github.com/ugorji/go/codec v1.2.12 // indirect
|
||||
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.13 // indirect
|
||||
go.uber.org/atomic v1.7.0 // indirect
|
||||
go.uber.org/multierr v1.6.0 // indirect
|
||||
@@ -76,4 +75,4 @@ require (
|
||||
gorm.io/driver/mysql v1.5.2 // indirect
|
||||
)
|
||||
|
||||
//replace github.com/eolinker/ap-account => ../../eolinker/ap-account
|
||||
replace github.com/eolinker/ap-account => ../aoaccount
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
|
||||
github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk=
|
||||
github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ=
|
||||
github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk=
|
||||
@@ -18,8 +19,8 @@ github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/
|
||||
github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
|
||||
github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=
|
||||
github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
@@ -139,10 +140,8 @@ github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
||||
github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE=
|
||||
github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
|
||||
github.com/urfave/cli/v2 v2.27.2 h1:6e0H+AkS+zDckwPCUrZkKX38mRaau4nL2uipkJpbkcI=
|
||||
github.com/urfave/cli/v2 v2.27.2/go.mod h1:g0+79LmHHATl7DAcHO99smiR/T7uGLw84w8Y42x+4eM=
|
||||
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw=
|
||||
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk=
|
||||
github.com/urfave/cli v1.22.16 h1:MH0k6uJxdwdeWQTwhSO42Pwr4YLrNLwBtg1MRgTqPdQ=
|
||||
github.com/urfave/cli v1.22.16/go.mod h1:EeJR6BKodywf4zciqrdw6hpCPk68JO9z5LazXZMn5Po=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.13 h1:RVZSAnWWWiI5IrYAXjQorajncORbS0zI48LQlE2kQWg=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.13/go.mod h1:XxHT4u1qU12E2+po+UVPrEeL94Um6zL58ppuJWXSAB8=
|
||||
go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
|
||||
|
||||
+6
-2
@@ -147,7 +147,11 @@ func (i *imlProviderModule) Provider(ctx context.Context, id string) (*ai_dto.Pr
|
||||
}
|
||||
defaultLLM, has := p.GetModel(info.DefaultLLM)
|
||||
if !has {
|
||||
return nil, fmt.Errorf("ai provider llm not found")
|
||||
model, has := p.DefaultModel(model_runtime.ModelTypeLLM)
|
||||
if !has {
|
||||
return nil, fmt.Errorf("ai provider llm not found")
|
||||
}
|
||||
defaultLLM = model
|
||||
}
|
||||
return &ai_dto.Provider{
|
||||
Id: info.Id,
|
||||
@@ -197,7 +201,7 @@ func (i *imlProviderModule) LLMs(ctx context.Context, driver string) ([]*ai_dto.
|
||||
DefaultLLMLogo: defaultLLM.Logo(),
|
||||
Logo: p.Logo(),
|
||||
Configured: false,
|
||||
}, err
|
||||
}, nil
|
||||
}
|
||||
|
||||
return items, &ai_dto.ProviderItem{Id: info.Id, Name: info.Name, DefaultLLM: info.DefaultLLM, Logo: p.Logo(), Configured: true}, nil
|
||||
|
||||
+2
-2
@@ -111,13 +111,13 @@ func (m *imlTeamModule) Create(ctx context.Context, input *team_dto.CreateTeam)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
supperRole, err := m.roleService.GetSupperRole(ctx, role.GroupTeam)
|
||||
superRole, err := m.roleService.GetSupperRole(ctx, role.GroupTeam)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return m.roleMemberService.Add(ctx, &role.AddMember{
|
||||
Role: supperRole.Id,
|
||||
Role: superRole.Id,
|
||||
User: input.Master,
|
||||
Target: role.TeamTarget(input.Id),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user