mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-01-12 00:06:29 +08:00
feat: Support for terminal operation with the Ollama model (#7907)
This commit is contained in:
@@ -156,7 +156,51 @@ const docTemplate = `{
|
||||
"name"
|
||||
],
|
||||
"formatEN": "add Ollama model [name]",
|
||||
"formatZH": "添加模型 [name]",
|
||||
"formatZH": "添加 Ollama 模型 [name]",
|
||||
"paramKeys": []
|
||||
}
|
||||
}
|
||||
},
|
||||
"/ai/ollama/model/close": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
},
|
||||
{
|
||||
"Timestamp": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"AI"
|
||||
],
|
||||
"summary": "Close Ollama model conn",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "request",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.OllamaModelName"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
}
|
||||
},
|
||||
"x-panel-log": {
|
||||
"BeforeFunctions": [],
|
||||
"bodyKeys": [
|
||||
"name"
|
||||
],
|
||||
"formatEN": "close conn for Ollama model [name]",
|
||||
"formatZH": "关闭 Ollama 模型连接 [name]",
|
||||
"paramKeys": []
|
||||
}
|
||||
}
|
||||
@@ -199,17 +243,17 @@ const docTemplate = `{
|
||||
{
|
||||
"db": "ollama_models",
|
||||
"input_column": "id",
|
||||
"input_value": "id",
|
||||
"isList": false,
|
||||
"input_value": "ids",
|
||||
"isList": true,
|
||||
"output_column": "name",
|
||||
"output_value": "name"
|
||||
"output_value": "names"
|
||||
}
|
||||
],
|
||||
"bodyKeys": [
|
||||
"id"
|
||||
"ids"
|
||||
],
|
||||
"formatEN": "remove ollama model [name]",
|
||||
"formatZH": "删除 ollama 模型 [name]",
|
||||
"formatEN": "remove Ollama model [names]",
|
||||
"formatZH": "删除 Ollama 模型 [names]",
|
||||
"paramKeys": []
|
||||
}
|
||||
}
|
||||
@@ -291,7 +335,7 @@ const docTemplate = `{
|
||||
"name"
|
||||
],
|
||||
"formatEN": "re-add Ollama model [name]",
|
||||
"formatZH": "添加模型重试 [name]",
|
||||
"formatZH": "添加 Ollama 模型重试 [name]",
|
||||
"paramKeys": []
|
||||
}
|
||||
}
|
||||
@@ -20633,18 +20677,15 @@ const docTemplate = `{
|
||||
"domain"
|
||||
],
|
||||
"properties": {
|
||||
"allowIPs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"appInstallID": {
|
||||
"type": "integer"
|
||||
},
|
||||
"domain": {
|
||||
"type": "string"
|
||||
},
|
||||
"ipList": {
|
||||
"type": "string"
|
||||
},
|
||||
"sslID": {
|
||||
"type": "integer"
|
||||
},
|
||||
@@ -20673,6 +20714,9 @@ const docTemplate = `{
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"connUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"domain": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -153,7 +153,51 @@
|
||||
"name"
|
||||
],
|
||||
"formatEN": "add Ollama model [name]",
|
||||
"formatZH": "添加模型 [name]",
|
||||
"formatZH": "添加 Ollama 模型 [name]",
|
||||
"paramKeys": []
|
||||
}
|
||||
}
|
||||
},
|
||||
"/ai/ollama/model/close": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
},
|
||||
{
|
||||
"Timestamp": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"AI"
|
||||
],
|
||||
"summary": "Close Ollama model conn",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "request",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.OllamaModelName"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
}
|
||||
},
|
||||
"x-panel-log": {
|
||||
"BeforeFunctions": [],
|
||||
"bodyKeys": [
|
||||
"name"
|
||||
],
|
||||
"formatEN": "close conn for Ollama model [name]",
|
||||
"formatZH": "关闭 Ollama 模型连接 [name]",
|
||||
"paramKeys": []
|
||||
}
|
||||
}
|
||||
@@ -196,17 +240,17 @@
|
||||
{
|
||||
"db": "ollama_models",
|
||||
"input_column": "id",
|
||||
"input_value": "id",
|
||||
"isList": false,
|
||||
"input_value": "ids",
|
||||
"isList": true,
|
||||
"output_column": "name",
|
||||
"output_value": "name"
|
||||
"output_value": "names"
|
||||
}
|
||||
],
|
||||
"bodyKeys": [
|
||||
"id"
|
||||
"ids"
|
||||
],
|
||||
"formatEN": "remove ollama model [name]",
|
||||
"formatZH": "删除 ollama 模型 [name]",
|
||||
"formatEN": "remove Ollama model [names]",
|
||||
"formatZH": "删除 Ollama 模型 [names]",
|
||||
"paramKeys": []
|
||||
}
|
||||
}
|
||||
@@ -288,7 +332,7 @@
|
||||
"name"
|
||||
],
|
||||
"formatEN": "re-add Ollama model [name]",
|
||||
"formatZH": "添加模型重试 [name]",
|
||||
"formatZH": "添加 Ollama 模型重试 [name]",
|
||||
"paramKeys": []
|
||||
}
|
||||
}
|
||||
@@ -20630,18 +20674,15 @@
|
||||
"domain"
|
||||
],
|
||||
"properties": {
|
||||
"allowIPs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"appInstallID": {
|
||||
"type": "integer"
|
||||
},
|
||||
"domain": {
|
||||
"type": "string"
|
||||
},
|
||||
"ipList": {
|
||||
"type": "string"
|
||||
},
|
||||
"sslID": {
|
||||
"type": "integer"
|
||||
},
|
||||
@@ -20670,6 +20711,9 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"connUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"domain": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -2457,14 +2457,12 @@ definitions:
|
||||
- ProxyCache
|
||||
dto.OllamaBindDomain:
|
||||
properties:
|
||||
allowIPs:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
appInstallID:
|
||||
type: integer
|
||||
domain:
|
||||
type: string
|
||||
ipList:
|
||||
type: string
|
||||
sslID:
|
||||
type: integer
|
||||
websiteID:
|
||||
@@ -2486,6 +2484,8 @@ definitions:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
connUrl:
|
||||
type: string
|
||||
domain:
|
||||
type: string
|
||||
sslID:
|
||||
@@ -6583,7 +6583,34 @@ paths:
|
||||
bodyKeys:
|
||||
- name
|
||||
formatEN: add Ollama model [name]
|
||||
formatZH: 添加模型 [name]
|
||||
formatZH: 添加 Ollama 模型 [name]
|
||||
paramKeys: []
|
||||
/ai/ollama/model/close:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: request
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.OllamaModelName'
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
- Timestamp: []
|
||||
summary: Close Ollama model conn
|
||||
tags:
|
||||
- AI
|
||||
x-panel-log:
|
||||
BeforeFunctions: []
|
||||
bodyKeys:
|
||||
- name
|
||||
formatEN: close conn for Ollama model [name]
|
||||
formatZH: 关闭 Ollama 模型连接 [name]
|
||||
paramKeys: []
|
||||
/ai/ollama/model/del:
|
||||
post:
|
||||
@@ -6609,14 +6636,14 @@ paths:
|
||||
BeforeFunctions:
|
||||
- db: ollama_models
|
||||
input_column: id
|
||||
input_value: id
|
||||
isList: false
|
||||
input_value: ids
|
||||
isList: true
|
||||
output_column: name
|
||||
output_value: name
|
||||
output_value: names
|
||||
bodyKeys:
|
||||
- id
|
||||
formatEN: remove ollama model [name]
|
||||
formatZH: 删除 ollama 模型 [name]
|
||||
- ids
|
||||
formatEN: remove Ollama model [names]
|
||||
formatZH: 删除 Ollama 模型 [names]
|
||||
paramKeys: []
|
||||
/ai/ollama/model/load:
|
||||
post:
|
||||
@@ -6665,7 +6692,7 @@ paths:
|
||||
bodyKeys:
|
||||
- name
|
||||
formatEN: re-add Ollama model [name]
|
||||
formatZH: 添加模型重试 [name]
|
||||
formatZH: 添加 Ollama 模型重试 [name]
|
||||
paramKeys: []
|
||||
/ai/ollama/model/search:
|
||||
post:
|
||||
|
||||
Reference in New Issue
Block a user