实现ai
This commit is contained in:
79
docs/docs.go
79
docs/docs.go
@@ -3371,6 +3371,59 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/feed/recipes/{id}/ai-diagnose": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "使用AI对指定配方进行点评,并针对目标猪类型给出建议。",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"饲料管理-配方"
|
||||
],
|
||||
"summary": "AI点评配方",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "配方ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "猪类型ID",
|
||||
"name": "pig_type_id",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "业务码为200代表AI点评成功",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/dto.ReviewRecipeResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/inventory/stock/adjust": {
|
||||
"post": {
|
||||
"security": [
|
||||
@@ -9165,6 +9218,23 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.ReviewRecipeResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ai_model": {
|
||||
"description": "使用的 AI 模型",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/models.AIModel"
|
||||
}
|
||||
]
|
||||
},
|
||||
"review_message": {
|
||||
"description": "点评内容",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.SellPigsRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -10084,6 +10154,15 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.AIModel": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Gemini"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"AI_MODEL_GEMINI"
|
||||
]
|
||||
},
|
||||
"models.AlarmCode": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
|
||||
@@ -3363,6 +3363,59 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/feed/recipes/{id}/ai-diagnose": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "使用AI对指定配方进行点评,并针对目标猪类型给出建议。",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"饲料管理-配方"
|
||||
],
|
||||
"summary": "AI点评配方",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "配方ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "猪类型ID",
|
||||
"name": "pig_type_id",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "业务码为200代表AI点评成功",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/dto.ReviewRecipeResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/inventory/stock/adjust": {
|
||||
"post": {
|
||||
"security": [
|
||||
@@ -9157,6 +9210,23 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.ReviewRecipeResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ai_model": {
|
||||
"description": "使用的 AI 模型",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/models.AIModel"
|
||||
}
|
||||
]
|
||||
},
|
||||
"review_message": {
|
||||
"description": "点评内容",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.SellPigsRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -10076,6 +10146,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.AIModel": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Gemini"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"AI_MODEL_GEMINI"
|
||||
]
|
||||
},
|
||||
"models.AlarmCode": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
|
||||
@@ -1648,6 +1648,16 @@ definitions:
|
||||
- quantity
|
||||
- treatment_location
|
||||
type: object
|
||||
dto.ReviewRecipeResponse:
|
||||
properties:
|
||||
ai_model:
|
||||
allOf:
|
||||
- $ref: '#/definitions/models.AIModel'
|
||||
description: 使用的 AI 模型
|
||||
review_message:
|
||||
description: 点评内容
|
||||
type: string
|
||||
type: object
|
||||
dto.SellPigsRequest:
|
||||
properties:
|
||||
pen_id:
|
||||
@@ -2274,6 +2284,12 @@ definitions:
|
||||
weight:
|
||||
type: number
|
||||
type: object
|
||||
models.AIModel:
|
||||
enum:
|
||||
- Gemini
|
||||
type: string
|
||||
x-enum-varnames:
|
||||
- AI_MODEL_GEMINI
|
||||
models.AlarmCode:
|
||||
enum:
|
||||
- 温度阈值
|
||||
@@ -4755,6 +4771,37 @@ paths:
|
||||
summary: 更新配方
|
||||
tags:
|
||||
- 饲料管理-配方
|
||||
/api/v1/feed/recipes/{id}/ai-diagnose:
|
||||
get:
|
||||
description: 使用AI对指定配方进行点评,并针对目标猪类型给出建议。
|
||||
parameters:
|
||||
- description: 配方ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 猪类型ID
|
||||
in: query
|
||||
name: pig_type_id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: 业务码为200代表AI点评成功
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/controller.Response'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/dto.ReviewRecipeResponse'
|
||||
type: object
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: AI点评配方
|
||||
tags:
|
||||
- 饲料管理-配方
|
||||
/api/v1/feed/recipes/generate-from-all-materials/{pig_type_id}:
|
||||
post:
|
||||
description: 根据指定的猪类型ID,使用系统中所有可用的原料,自动计算并创建一个成本最优的配方。
|
||||
|
||||
Reference in New Issue
Block a user