Skip to content

Commit 88331d1

Browse files
authored
Merge pull request #7 from TuringOpsSH/release/0.2.7
Release/0.2.7
2 parents 32d1887 + 4c440b7 commit 88331d1

File tree

251 files changed

+33989
-3095
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

251 files changed

+33989
-3095
lines changed

.idea/next_console.iml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,33 @@ All notable changes to this project will be documented in this file.
44
Format adheres to [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
55

66

7-
Here's the English version of the changelog with professional formatting:
7+
## [0.2.7] - 2025-09-26
8+
9+
### Features
10+
11+
**Model Management Module Refactor**
12+
- [x] Refined model integration process
13+
- [x] Support for text generation, reasoning models, vector models, ranking models, and image understanding models
14+
- [x] Support for instant health testing
15+
- [x] Support for runtime parameter configuration
16+
- [x] Support for model permission management
17+
- [x] Support for viewing model runtime status
18+
19+
### Fixes and Improvements
20+
21+
- [x] Fixed format restrictions for file list parameters
22+
- [x] Optimized the data model for model parameters
23+
- [x] Added headers to Extra-body
24+
- [x] After application publication, automatically add authorization to self by default
25+
- [x] Optimized layout of AI Application Factory
26+
- [x] Agent nodes can search and select models
27+
- [x] Nodes can directly create duplicates
28+
- [x] Added icons to backend management menu keys
29+
- [x] Support for launching services from source code on Mac
30+
- [x] Official assistants can modify names and icons
31+
- [x] Introduced store in Application Factory
32+
- [x] Fixed coding standards for some components
33+
834

935
---
1036

CHANGELOG_CN.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,37 @@
33
本项目所有显著变更将记录在此文件中。
44
格式遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.0.0/)
55

6+
## [0.2.7] - 2025-09-26
7+
8+
### 新特性
9+
10+
**模型管理模块重构**
11+
- [x] 接入模型流程细化
12+
- [x] 支持文本生成、推理模型、向量模型、排序模型、图片理解模型
13+
- [x] 支持即时健康测试
14+
- [x] 支持运行参数设定
15+
- [x] 支持模型权限管理
16+
- [x] 支持查看模型运行状态
17+
18+
### 修复优化
19+
20+
- [x] 修复文件列表参数的格式限制
21+
- [x] 优化模型参数的数据模型
22+
- [x] Extra -body 添加表头
23+
- [x] 应用发布后,默认给自己新增授权
24+
- [x] AI应用工厂布局优化
25+
- [x] Agent节点可以搜索选择模型
26+
- [x] 节点可以直接创建副本
27+
- [x] 后台管理菜单键添加图标
28+
- [x] 支持mac端源码启动服务
29+
- [x] 官方助手可以修改名称和图标
30+
- [x] 应用工厂引入store
31+
- [x] 修复部分组件的编码规范
32+
33+
---
34+
35+
36+
637
## [0.2.6] - 2025-09-09
738

839
### 新特性

admin/app/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
from app.views.user_center.user_notice_view import *
66
from app.views.user_center.system_notice import *
77

8+
from app.views.contacts.company import *
9+
from app.views.contacts.department import *
10+
from app.views.contacts.friends import *
11+
from app.views.contacts.colleague import *
12+
from app.views.contacts.visitor import *
13+
814
# # 配置中心
915
from app.views.configure_center.system_config import *
1016
from app.views.configure_center.user_config import *

admin/app/app.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
from gevent import monkey
2-
monkey.patch_all()
2+
import platform
3+
if platform.system().lower().startswith('darwin'):
4+
monkey.patch_socket()
5+
else:
6+
monkey.patch_all()
37
import logging
48
import os
59
from logging.handlers import RotatingFileHandler

admin/app/models/configure_center/llm_kernel.py

Lines changed: 93 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class LLMInstance(db.Model):
99
id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='自增id')
1010
llm_code = db.Column(db.String(255), comment='基模型实例编号')
1111
llm_name = db.Column(db.String(255), nullable=False, comment='基模型名称')
12+
llm_label = db.Column(db.String(255), nullable=False, comment='模型显示标签')
1213
user_id = db.Column(db.Integer, nullable=False, comment='创建用户')
1314
llm_api_secret_key = db.Column(db.String(1000), comment='基模型认证钥匙')
1415
llm_api_access_key = db.Column(db.String(1000), comment='基模型访问钥匙')
@@ -35,14 +36,19 @@ class LLMInstance(db.Model):
3536
is_std_openai = db.Column(db.Boolean, default=True, comment='是否支持openai-sdk')
3637
support_vis = db.Column(db.Boolean, default=False, comment='是否支持视觉')
3738
support_file = db.Column(db.Boolean, default=False, comment='是否支持文件')
39+
extra_headers = db.Column(db.JSON, comment='请求头', default={})
40+
extra_body = db.Column(db.JSON, comment='请求体', default={})
41+
use_default = db.Column(db.Boolean, default=True, comment='是否使用默认配置')
3842
create_time = db.Column(db.TIMESTAMP, server_default=func.now(), comment='创建时间')
3943
update_time = db.Column(db.TIMESTAMP, server_default=func.now(), comment='更新时间')
4044

4145
def to_dict(self):
4246
return {
4347
"llm_code": self.llm_code,
4448
"llm_name": self.llm_name,
49+
"llm_label": self.llm_label,
4550
"user_id": self.user_id,
51+
"llm_icon": self.llm_icon,
4652
"llm_type": self.llm_type,
4753
"llm_desc": self.llm_desc,
4854
"llm_tags": self.llm_tags,
@@ -53,7 +59,6 @@ def to_dict(self):
5359
"llm_status": self.llm_status,
5460
"llm_source": self.llm_source,
5561
"llm_is_public": self.llm_is_public,
56-
"llm_icon": self.llm_icon if self.llm_icon else "",
5762
"create_time": self.create_time.strftime('%Y-%m-%d %H:%M:%S'),
5863
"update_time": self.update_time.strftime('%Y-%m-%d %H:%M:%S'),
5964
"frequency_penalty": self.frequency_penalty,
@@ -68,19 +73,105 @@ def to_dict(self):
6873
"is_std_openai": self.is_std_openai,
6974
"support_file": self.support_file,
7075
"support_vis": self.support_vis,
76+
"extra_headers": self.extra_headers,
77+
"extra_body": self.extra_body,
78+
"use_default": self.use_default,
7179
}
7280

7381
def show_info(self):
7482
return {
83+
"user_id": self.user_id,
7584
"llm_code": self.llm_code,
7685
"llm_name": self.llm_name,
86+
"llm_company": self.llm_company if self.llm_company else "未知厂商",
87+
"llm_label": self.llm_label if self.llm_label else "",
7788
"llm_type": self.llm_type,
7889
"llm_desc": self.llm_desc,
7990
"llm_icon": self.llm_icon,
91+
"llm_tags": self.llm_tags,
8092
"llm_status": self.llm_status,
8193
"llm_is_proxy": self.llm_is_proxy,
8294
"support_vis": self.support_vis,
8395
"support_file": self.support_file,
8496
"create_time": self.create_time.strftime('%Y-%m-%d %H:%M:%S'),
8597
"update_time": self.update_time.strftime('%Y-%m-%d %H:%M:%S'),
86-
}
98+
}
99+
100+
101+
class LLMInstanceAuthorizeInfo(db.Model):
102+
"""
103+
基模型实例授权信息表
104+
"""
105+
__tablename__ = 'llm_instance_authorize_info'
106+
id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='自增id')
107+
user_id = db.Column(db.Integer, nullable=False, comment='用户id')
108+
model_id = db.Column(db.Integer, nullable=False, comment='模型id')
109+
auth_colleague_id = db.Column(db.Integer, comment='被授权用户id')
110+
auth_department_id = db.Column(db.Integer, comment='被授权部门id')
111+
auth_company_id = db.Column(db.Integer, comment='被授权公司id')
112+
auth_friend_id = db.Column(db.Integer, comment='被授权联系人id')
113+
auth_type = db.Column(db.String(255), nullable=False, comment='授权类型')
114+
auth_status = db.Column(db.String(255), nullable=False, comment='授权状态')
115+
create_time = db.Column(db.TIMESTAMP, server_default=func.now(), comment='创建时间')
116+
update_time = db.Column(db.TIMESTAMP, server_default=func.now(), comment='更新时间')
117+
118+
def to_dict(self):
119+
return {
120+
"id": self.id,
121+
"user_id": self.user_id,
122+
"model_id": self.model_id,
123+
"auth_colleague_id": self.auth_colleague_id,
124+
"auth_department_id": self.auth_department_id,
125+
"auth_company_id": self.auth_company_id,
126+
"auth_friend_id": self.auth_friend_id,
127+
"auth_type": self.auth_type,
128+
"auth_status": self.auth_status,
129+
"create_time": self.create_time.strftime('%Y-%m-%d %H:%M:%S'),
130+
"update_time": self.update_time.strftime('%Y-%m-%d %H:%M:%S'),
131+
}
132+
133+
134+
class LLMSupplierInfo(db.Model):
135+
"""
136+
基模型厂商信息表
137+
"""
138+
__tablename__ = 'llm_supplier_info'
139+
id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='自增id')
140+
supplier_code = db.Column(db.String(255), nullable=False, comment='基模型厂商编号')
141+
supplier_name = db.Column(db.String(255), nullable=False, comment='基模型厂商名称')
142+
supplier_desc = db.Column(db.Text, comment='基模型厂商描述')
143+
supplier_icon = db.Column(db.Text, comment='基模型厂商图标')
144+
supplier_type = db.Column(db.String(10), comment='基模型厂商类型')
145+
supplier_website = db.Column(db.String(255), comment='基模型厂商官网')
146+
supplier_models = db.Column(db.JSON, comment='基模型厂商支持的模型列表')
147+
supplier_api_url = db.Column(db.Text, comment='基模型厂商API地址')
148+
supplier_status = db.Column(db.String(255), comment='基模型厂商状态', default='正常')
149+
create_time = db.Column(db.TIMESTAMP, server_default=func.now(), comment='创建时间')
150+
update_time = db.Column(db.TIMESTAMP, server_default=func.now(), comment='更新时间')
151+
152+
def to_dict(self):
153+
return {
154+
"id": self.id,
155+
"supplier_code": self.supplier_code,
156+
"supplier_name": self.supplier_name,
157+
"supplier_desc": self.supplier_desc,
158+
"supplier_icon": self.supplier_icon,
159+
"supplier_website": self.supplier_website,
160+
"supplier_models": self.supplier_models,
161+
"supplier_api_url": self.supplier_api_url,
162+
"supplier_type": self.supplier_type,
163+
"supplier_status": self.supplier_status,
164+
"create_time": self.create_time.strftime('%Y-%m-%d %H:%M:%S'),
165+
"update_time": self.update_time.strftime('%Y-%m-%d %H:%M:%S'),
166+
}
167+
168+
def show_info(self):
169+
return {
170+
"id": self.id,
171+
"supplier_code": self.supplier_code,
172+
"supplier_name": self.supplier_name,
173+
"supplier_desc": self.supplier_desc,
174+
"supplier_icon": self.supplier_icon,
175+
"supplier_type": self.supplier_type,
176+
}
177+

0 commit comments

Comments
 (0)