mirror of
https://github.com/AIDotNet/AntSK.git
synced 2026-02-20 07:59:11 +08:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d93e962ae9 | ||
|
|
1da5d5bce1 | ||
|
|
b853ab4851 | ||
|
|
00b37d9600 | ||
|
|
c467a3c427 | ||
|
|
06cdbb14d0 | ||
|
|
115e12257b | ||
|
|
533a47566b | ||
|
|
51ec2db3c3 | ||
|
|
3aa76e0662 | ||
|
|
755d2c2d4f | ||
|
|
bd27048237 | ||
|
|
01063f2d49 | ||
|
|
5a4f038da1 | ||
|
|
dd6e1a6d54 | ||
|
|
52e20396ad | ||
|
|
a8f48929e7 | ||
|
|
ae89fb5ec7 |
15
README.md
15
README.md
@@ -86,7 +86,7 @@ version: '3.8'
|
||||
services:
|
||||
antsk:
|
||||
container_name: antsk
|
||||
image: registry.cn-hangzhou.aliyuncs.com/AIDotNet/antsk:v0.5.0
|
||||
image: registry.cn-hangzhou.aliyuncs.com/AIDotNet/antsk:v0.6.0
|
||||
ports:
|
||||
- 5000:5000
|
||||
networks:
|
||||
@@ -204,13 +204,14 @@ This warehouse follows the [AntSK License](https://github.com/AIDotNet/AntSK?tab
|
||||
|
||||
This project follows the Apache 2.0 agreement, in addition to the following additional terms
|
||||
|
||||
1. This project can be used for commercial purposes, but it has the right to prohibit you from using it if it violates the following provisions
|
||||
|
||||
2. Without authorization, you are not allowed to modify AntSK's logo and title information
|
||||
1. **Free Commercial Use**: Users can use the software for commercial purposes without modifying the code.
|
||||
2. **Commercial License Required**: A commercial license is required if any of the following conditions are met:
|
||||
1. You modify, develop, or alter the software, including but not limited to changes to the application name, logo, code, or functionality.
|
||||
2. You provide multi-tenant services to enterprise customers with 10 or more users.
|
||||
3. You pre-install or integrate the software into hardware devices or products and bundle it for sale.
|
||||
4. You are engaging in large-scale procurement for government or educational institutions, especially involving security, data privacy, or other sensitive requirements.
|
||||
|
||||
4. Without authorization, you are not allowed to modify the copyright information at the bottom of the page
|
||||
|
||||
6. If you need authorization, you can contact WeChat: **xuzeyu91**
|
||||
3. If you need authorization, you can contact WeChat: **xuzeyu91**
|
||||
|
||||
If you plan to use AntSK in commercial projects, you need to ensure that you follow the following steps:
|
||||
|
||||
|
||||
15
README.zh.md
15
README.zh.md
@@ -100,7 +100,7 @@ version: '3.8'
|
||||
services:
|
||||
antsk:
|
||||
container_name: antsk
|
||||
image: registry.cn-hangzhou.aliyuncs.com/AIDotNet/antsk:v0.3.1
|
||||
image: registry.cn-hangzhou.aliyuncs.com/AIDotNet/antsk:v0.6.0
|
||||
ports:
|
||||
- 5000:5000
|
||||
networks:
|
||||
@@ -215,13 +215,14 @@ DB我使用的是CodeFirst模式,只要配置好数据库链接,表结构是
|
||||
|
||||
除以下附加条款外,该项目遵循Apache 2.0协议
|
||||
|
||||
1. 本项目可以用于商业目的,但如果违反以下规定,它有权禁止您使用
|
||||
1. **免费商用**:用户在不修改代码的情况下,可以免费用于商业目的。
|
||||
2. **商业授权**:如果您满足以下任意条件之一,需取得商业授权:
|
||||
1. 对本软件进行二次修改、开发(包括但不限于修改应用名称、logo、代码以及功能)。
|
||||
2. 为企业客户提供多租户服务,且该服务支持 10 人或以上的使用。
|
||||
3. 预装或集成到硬件设备或产品中进行捆绑销售。
|
||||
4. 政府或教育机构的大规模采购项目,特别是涉及安全、数据隐私等敏感需求时。
|
||||
|
||||
2. 未经授权,您不允许修改AntSK的徽标和标题信息
|
||||
|
||||
3. 未经授权,您不能修改页面底部的版权信息
|
||||
|
||||
4. 如果您需要授权,可以联系微信:xuzeyu91
|
||||
3. 如果您需要授权,可以联系微信:xuzeyu91
|
||||
|
||||
如果您打算在商业项目中使用AntSK,您需要确保遵守以下步骤:
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ version: '3.8'
|
||||
services:
|
||||
antsk:
|
||||
container_name: antsk
|
||||
image: registry.cn-hangzhou.aliyuncs.com/xuzeyu91/antsk:v0.5.5
|
||||
image: registry.cn-hangzhou.aliyuncs.com/xuzeyu91/antsk:v0.6.2
|
||||
# 如果需要pytorch环境需要使用下面这个镜像,镜像比较大
|
||||
# image: registry.cn-hangzhou.aliyuncs.com/xuzeyu91/antsk:p0.5.5
|
||||
# image: registry.cn-hangzhou.aliyuncs.com/xuzeyu91/antsk:p0.6.2
|
||||
ports:
|
||||
- 5000:5000
|
||||
networks:
|
||||
|
||||
@@ -16,7 +16,7 @@ services:
|
||||
- 18889:18889
|
||||
restart: unless-stopped
|
||||
antskpg:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/xuzeyu91/pg:v0.5.0
|
||||
image: registry.cn-hangzhou.aliyuncs.com/xuzeyu91/pg:v0.5.0
|
||||
container_name: antskpg
|
||||
restart: always
|
||||
ports: # 生产环境建议不要暴露
|
||||
@@ -32,9 +32,9 @@ services:
|
||||
- ./pg/data:/var/lib/postgresql/data
|
||||
antsk:
|
||||
container_name: antsk
|
||||
image: registry.cn-hangzhou.aliyuncs.com/xuzeyu91/antsk:v0.5.5
|
||||
image: registry.cn-hangzhou.aliyuncs.com/xuzeyu91/antsk:v0.6.2
|
||||
# 如果需要pytorch环境需要使用下面这个镜像,镜像比较大
|
||||
# image: registry.cn-hangzhou.aliyuncs.com/xuzeyu91/antsk:p0.5.5
|
||||
# image: registry.cn-hangzhou.aliyuncs.com/xuzeyu91/antsk:p0.6.2
|
||||
ports:
|
||||
- 5000:5000
|
||||
networks:
|
||||
|
||||
@@ -10,6 +10,6 @@ namespace AntSK.Domain.Domain.Interface
|
||||
public interface IOllamaService
|
||||
{
|
||||
public event LogMessageHandler LogMessageReceived;
|
||||
Task StartOllama(string modelName);
|
||||
Task OllamaPull(string modelName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,14 +75,10 @@ namespace AntSK.Domain.Domain.Other.Bge
|
||||
}
|
||||
PyObject result = model.compute_score(pyList, normalize: true);
|
||||
|
||||
//BAAI/bge-reranker-v2-minicpm-layerwise
|
||||
// https://www.modelscope.cn/models/AI-ModelScope/bge-reranker-v2-m3
|
||||
|
||||
//PyList cutoffLayers = new PyList();
|
||||
//cutoffLayers.Append(new PyInt(8));
|
||||
//dynamic scores = model.compute_score(pyList, cutoff_layers: cutoffLayers);
|
||||
|
||||
return result.ConvertToDouble();
|
||||
var res = result.ToString();
|
||||
var res1 = res.Replace("[", "").Replace("]", "").ConvertToDouble();
|
||||
|
||||
return res1;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace AntSK.Domain.Domain.Service
|
||||
LogMessageReceived?.Invoke(message);
|
||||
}
|
||||
|
||||
public async Task StartOllama(string modelName)
|
||||
public async Task OllamaPull(string modelName)
|
||||
{
|
||||
Console.OutputEncoding = Encoding.UTF8;
|
||||
var cmdTask = Task.Factory.StartNew(() =>
|
||||
@@ -35,7 +35,7 @@ namespace AntSK.Domain.Domain.Service
|
||||
StartInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = "ollama",
|
||||
Arguments = "run " + modelName,
|
||||
Arguments = "pull " + modelName,
|
||||
UseShellExecute = false,
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
|
||||
@@ -9,4 +9,4 @@ snowflake-arctic-embed:137m
|
||||
snowflake-arctic-embed:335m
|
||||
bge-m3
|
||||
bge-large:335m
|
||||
paraphrase-multilingual:278m
|
||||
paraphrase-multilingual:278m
|
||||
@@ -108,4 +108,4 @@ llama-pro:instruct
|
||||
everythinglm:13b
|
||||
llava-phi3:3.8b
|
||||
mistrallite:7b
|
||||
notus:7b
|
||||
notus:7b
|
||||
|
||||
@@ -17,7 +17,7 @@ fire
|
||||
modelscope
|
||||
langchain-community
|
||||
sentence_transformers
|
||||
FlagEmbedding
|
||||
flagembedding
|
||||
packaging
|
||||
pyyaml
|
||||
trl>=0.8.6
|
||||
|
||||
@@ -68,111 +68,142 @@
|
||||
</AntDesign.Col>
|
||||
</Row>
|
||||
<Divider><Title Level="3">功能特性</Title></Divider>
|
||||
<Space Size=@(("10", "10" )) Wrap Align="start" Style="padding:10px">
|
||||
<Space Size=@(("10", "10" )) Wrap Align="start" Style="padding:10px">
|
||||
<SpaceItem>
|
||||
<Card Bordered="true" Title=@("👉🏻商业版") Hoverable="true" Style="height:260px;width:300px">
|
||||
<Card Bordered="true" Title=@("👉🏻商业授权") Hoverable="true" Style="height:260px;width:300px">
|
||||
<Body>
|
||||
<Text>● AntSKPro为商业版 <a href="https://antsk.cn" target="_blank">访问官网</a></Text>
|
||||
<br>
|
||||
<Text>● 开源版本请参见:</Text>
|
||||
<a href="https://github.com/AIDotNet/AntSK" target="_blank">AntSK开源版</a>
|
||||
<br>
|
||||
<Text>● 如需商业版授权,请联系微信:</Text>
|
||||
<b style="color:#1890ff">xuzeyu91</b>
|
||||
<Text>● 未获取商业授权,禁止商业使用</Text>
|
||||
<br>
|
||||
<Text>● 如需商业授权,请联系微信:</Text>
|
||||
<b style="color:#7F7FFF">xuzeyu91</b>
|
||||
<br>
|
||||
</Body>
|
||||
</Card>
|
||||
</SpaceItem>
|
||||
<SpaceItem>
|
||||
<Card Bordered="true" Title=@("🍬语义内核") Hoverable="true" Style="height:260px;width:300px">
|
||||
<Body>
|
||||
<Text>1、采用遥遥领先的自然语言处理技术</Text>
|
||||
<br>
|
||||
<Text>2、准确理解、处理和响应复杂的语义查询</Text>
|
||||
<br>
|
||||
<Text>3、为用户提供精确的信息检索和推荐服务</Text>
|
||||
<br>
|
||||
</Body>
|
||||
</Card>
|
||||
</SpaceItem>
|
||||
<SpaceItem>
|
||||
<Card Bordered="true" Title=@("🏁知识库") Hoverable="true" Style="height:260px;width:300px">
|
||||
<Body>
|
||||
<Text>1、通过文档(Word、PDF、Excel、Txt、Markdown、Json、PPT)等形式导入知识库</Text>
|
||||
<br>
|
||||
<Text>2、可以进行知识库文档搜索问答</Text>
|
||||
<br>
|
||||
</Body>
|
||||
</Card>
|
||||
</SpaceItem>
|
||||
<SpaceItem>
|
||||
<Card Bordered="true" Title=@("🌈GPTs 生成") Hoverable="true" Style="height:260px;width:300px">
|
||||
<Body>
|
||||
<Text>1、支持创建个性化的GPTs</Text>
|
||||
<br>
|
||||
<Text>2、构建您自己的GPTs</Text>
|
||||
<br>
|
||||
<Text>3、可以尽情发挥你的想象力</Text>
|
||||
<br>
|
||||
</Body>
|
||||
</Card>
|
||||
</SpaceItem>
|
||||
<SpaceItem>
|
||||
<Card Bordered="true" Title=@("🎁插件生态") Hoverable="true" Style="height:260px;width:300px">
|
||||
<Body>
|
||||
<Text>1、开放式API插件系统,允许第三方开发者或服务商轻松将其接口集成到AntSK,不断增强应用功能</Text>
|
||||
<br>
|
||||
<Text>2、开放式函数插件系统,标准格式的函数代码以及dll后集成到AntSK,不断增强应用功能</Text>
|
||||
<br>
|
||||
<Text>3、支持二次开发Function</Text>
|
||||
<br>
|
||||
</Body>
|
||||
</Card>
|
||||
</SpaceItem>
|
||||
<SpaceItem>
|
||||
<Card Bordered="true" Title=@("📱模型集成与管理") Hoverable="true" Style="height:260px;width:300px">
|
||||
<Body>
|
||||
<Text>1、适配和管理集成不同厂商的不同模型</Text>
|
||||
<br>
|
||||
<Text>
|
||||
2、并且支持llama.cpp所支持的gguf类型的模型离线运行
|
||||
</Text>
|
||||
<br>
|
||||
<SpaceItem>
|
||||
<Card Bordered="true" Title=@("🌟AntSKPro 一体机") Hoverable="true" Style="height:260px;width:300px">
|
||||
<Body>
|
||||
<Text>
|
||||
3、支持llamafactory所支持的模型,包括baichuan、gemma、yuan、yi等
|
||||
● 海量会话+向量+重排离线模型
|
||||
</Text>
|
||||
<br>
|
||||
<Text>
|
||||
4、未来将实现模型的训练、微调、部署一站式服务
|
||||
</Text>
|
||||
<br>
|
||||
</Body>
|
||||
</Card>
|
||||
</SpaceItem>
|
||||
<SpaceItem>
|
||||
<Card Bordered="true" Title=@("🔗国产信创") Hoverable="true" Style="height:260px;width:300px">
|
||||
<Body>
|
||||
<Text>1、支持国产本地化模型</Text>
|
||||
<br>
|
||||
<Text>
|
||||
2、支持国产信创数据库
|
||||
</Text>
|
||||
<br>
|
||||
<Text>
|
||||
3、支持信创环境运行
|
||||
</Text>
|
||||
<br>
|
||||
</Body>
|
||||
</Card>
|
||||
</SpaceItem>
|
||||
<SpaceItem>
|
||||
<Card Bordered="true" Title=@("❤关注我的公众号") Hoverable="true" Style="height:260px;width:300px">
|
||||
<Body>
|
||||
<Image Height="170" Src="./assets/gzh.jpg" />
|
||||
</Body>
|
||||
</Card>
|
||||
</SpaceItem>
|
||||
|
||||
</Space>
|
||||
<Text>● 装机直发、开箱即用</Text>
|
||||
<a href="https://antsk.cn/archives/wei-ming-ming-wen-zhang" target="_blank">更多详情</a>
|
||||
<br>
|
||||
<Text>
|
||||
● 保姆式指导
|
||||
</Text>
|
||||
<br>
|
||||
<Text>
|
||||
● 整机硬件质保三年
|
||||
</Text>
|
||||
<br>
|
||||
</Body>
|
||||
</Card>
|
||||
</SpaceItem>
|
||||
<SpaceItem>
|
||||
<Card Bordered="true" Title=@("🍬语义内核") Hoverable="true" Style="height:260px;width:300px">
|
||||
<Body>
|
||||
<Text>● 采用领先的自然语言处理技术</Text>
|
||||
<br>
|
||||
<Text>● 精准理解、处理和响应复杂的语义查询</Text>
|
||||
<br>
|
||||
<Text>● 为用户提供精准的信息检索和推荐服务</Text>
|
||||
<br>
|
||||
</Body>
|
||||
</Card>
|
||||
</SpaceItem>
|
||||
<SpaceItem>
|
||||
<Card Bordered="true" Title=@("🏁知识库") Hoverable="true" Style="height:260px;width:300px">
|
||||
<Body>
|
||||
<Text>● 支持导入各种格式的文档(如Word, PDF, Excel, Txt, Json, PPT, Png等)至知识库和知识图谱</Text>
|
||||
<br>
|
||||
<Text>● 可进行知识库和知识图谱文档的搜索问答</Text>
|
||||
<br>
|
||||
</Body>
|
||||
</Card>
|
||||
</SpaceItem>
|
||||
<SpaceItem>
|
||||
<Card Bordered="true" Title=@("🌈GPTs 生成") Hoverable="true" Style="height:260px;width:300px">
|
||||
<Body>
|
||||
<Text>● 支持创建个性化的GPTs</Text>
|
||||
<br>
|
||||
<Text>● 构建您自己的GPTs</Text>
|
||||
<br>
|
||||
<Text>● 尽情发挥您的想象力</Text>
|
||||
<br>
|
||||
</Body>
|
||||
</Card>
|
||||
</SpaceItem>
|
||||
<SpaceItem>
|
||||
<Card Bordered="true" Title=@("🎁插件生态") Hoverable="true" Style="height:260px;width:300px">
|
||||
<Body>
|
||||
<Text>● 开放API插件系统,允许第三方开发者或服务商轻松集成接口至AntSK,持续增强应用功能</Text>
|
||||
<br>
|
||||
<Text>● 开放函数插件系统,标准格式的函数代码及dll文件可集成至AntSK,持续增强应用能力</Text>
|
||||
<br>
|
||||
<Text>● 支持二次开发Function</Text>
|
||||
<br>
|
||||
</Body>
|
||||
</Card>
|
||||
</SpaceItem>
|
||||
<SpaceItem>
|
||||
<Card Bordered="true" Title=@("📱模型集成与管理") Hoverable="true" Style="height:260px;width:300px">
|
||||
<Body>
|
||||
<Text>● 适配与管理来自不同厂商的多种模型</Text>
|
||||
<br>
|
||||
<Text>
|
||||
● 支持ollama支持的gguf模型类型离线运行
|
||||
</Text>
|
||||
<br>
|
||||
<Text>
|
||||
● 支持llamafactory所支持的模型,包括baichuan、gemma、yuan、yi等
|
||||
</Text>
|
||||
<br>
|
||||
<Text>
|
||||
● 未来将实现模型的训练、微调、部署一站式服务
|
||||
</Text>
|
||||
<br>
|
||||
</Body>
|
||||
</Card>
|
||||
</SpaceItem>
|
||||
<SpaceItem>
|
||||
<Card Bordered="true" Title=@("🔗国产信创") Hoverable="true" Style="height:260px;width:300px">
|
||||
<Body>
|
||||
<Text>● 支持国产本地化模型</Text>
|
||||
<br>
|
||||
<Text>
|
||||
● 支持国产信创数据库
|
||||
</Text>
|
||||
<br>
|
||||
<Text>
|
||||
● 支持信创环境运行
|
||||
</Text>
|
||||
<br>
|
||||
</Body>
|
||||
</Card>
|
||||
</SpaceItem>
|
||||
<SpaceItem>
|
||||
<Card Bordered="true" Title=@("✨技术支持") Hoverable="true" Style="height:260px;width:300px">
|
||||
<Body>
|
||||
<Text>● 商业版享有专业的技术支持(1对1)</Text>
|
||||
<br>
|
||||
<Text>
|
||||
● 提供技术指导、方案设计、技术对接等服务
|
||||
</Text>
|
||||
<br>
|
||||
<Text>
|
||||
● 提供培训服务
|
||||
</Text>
|
||||
<br>
|
||||
</Body>
|
||||
</Card>
|
||||
</SpaceItem>
|
||||
</Space>
|
||||
</GridContent>
|
||||
|
||||
|
||||
@@ -170,6 +170,8 @@
|
||||
</Select>
|
||||
</InputGroup>
|
||||
<a href="https://ollama.com/library" target="_blank">获取更多模型</a>
|
||||
<br/>
|
||||
<span>可以在OllamaModelList.txt中进行修改</span>
|
||||
</FormItem>
|
||||
<FormItem Label="请求地址" LabelCol="LayoutModel._formItemLayout.LabelCol" WrapperCol="LayoutModel._formItemLayout.WrapperCol">
|
||||
<Input Placeholder="http://localhost:11434/" @bind-Value="@context.EndPoint" AutoComplete="false" />
|
||||
@@ -179,7 +181,7 @@
|
||||
</FormItem>
|
||||
<FormItem Label="Ollama服务" LabelCol="LayoutModel._formItemLayout.LabelCol" WrapperCol="LayoutModel._formItemLayout.WrapperCol">
|
||||
<InputGroup>
|
||||
<Button Type="primary" OnClick="StartOllamaService">启动</Button>
|
||||
<Button Type="primary" OnClick="StartOllamaService">下载模型</Button>
|
||||
</InputGroup>
|
||||
</FormItem>
|
||||
}
|
||||
@@ -200,6 +202,8 @@
|
||||
</Select>
|
||||
</InputGroup>
|
||||
<a href="https://ollama.com/library" target="_blank">获取更多模型</a>
|
||||
<br />
|
||||
<span>可以在OllamaEmbeddingModelList.txt中进行修改</span>
|
||||
</FormItem>
|
||||
<FormItem Label="请求地址" LabelCol="LayoutModel._formItemLayout.LabelCol" WrapperCol="LayoutModel._formItemLayout.WrapperCol">
|
||||
<Input Placeholder="http://localhost:11434/" @bind-Value="@context.EndPoint" AutoComplete="false" />
|
||||
@@ -209,7 +213,7 @@
|
||||
</FormItem>
|
||||
<FormItem Label="Ollama服务" LabelCol="LayoutModel._formItemLayout.LabelCol" WrapperCol="LayoutModel._formItemLayout.WrapperCol">
|
||||
<InputGroup>
|
||||
<Button Type="primary" OnClick="StartOllamaService">启动</Button>
|
||||
<Button Type="primary" OnClick="StartOllamaService">下载模型</Button>
|
||||
</InputGroup>
|
||||
</FormItem>
|
||||
}
|
||||
@@ -220,9 +224,8 @@
|
||||
@bind-Value="@context.ModelName"
|
||||
ValueProperty="c=>c"
|
||||
LabelProperty="c=>c">
|
||||
</Select>
|
||||
</Select>
|
||||
</FormItem>
|
||||
|
||||
<FormItem Label="Python路径" LabelCol="LayoutModel._formItemLayout.LabelCol" WrapperCol="LayoutModel._formItemLayout.WrapperCol">
|
||||
<Popover ContentTemplate="@_content" Title="提示" Style="width:100%">
|
||||
<Input Placeholder="D:\Programs\Python\Python311\python311.dll" @bind-Value="@context.EndPoint" AutoComplete="false" />
|
||||
|
||||
@@ -317,7 +317,7 @@ namespace AntSK.Pages.Setting.AIModel
|
||||
|
||||
_ollamaService.LogMessageReceived -= CmdLogHandler;
|
||||
_ollamaService.LogMessageReceived += CmdLogHandler;
|
||||
_ollamaService.StartOllama(_aiModel.ModelName);
|
||||
_ollamaService.OllamaPull(_aiModel.ModelName);
|
||||
}
|
||||
|
||||
private void OnCancelPipInstall()
|
||||
|
||||
Reference in New Issue
Block a user