158 lines
6.8 KiB
Go
158 lines
6.8 KiB
Go
|
|
package proto
|
||
|
|
|
||
|
|
type PPTThemeRequest struct {
|
||
|
|
Style string `json:"style"`
|
||
|
|
Color string `json:"color"`
|
||
|
|
Industry string `json:"industry"`
|
||
|
|
PageNum int `json:"pageNum"`
|
||
|
|
PageSize int `json:"pageSize"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// Response 定义响应结构体
|
||
|
|
type PPTThemeResponse struct {
|
||
|
|
Flag bool `json:"flag"`
|
||
|
|
Code int `json:"code"`
|
||
|
|
Desc string `json:"desc"`
|
||
|
|
Count interface{} `json:"count"`
|
||
|
|
Data PPTThemeData `json:"data"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// Data 定义数据结构体
|
||
|
|
type PPTThemeData struct {
|
||
|
|
Total int `json:"total"`
|
||
|
|
Records []PPTThemeRecord `json:"records"`
|
||
|
|
PageNum int `json:"pageNum"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// Record 定义记录结构体
|
||
|
|
type PPTThemeRecord struct {
|
||
|
|
TemplateIndexId string `json:"templateIndexId"`
|
||
|
|
PageCount int `json:"pageCount"`
|
||
|
|
Type string `json:"type"`
|
||
|
|
Color string `json:"color"`
|
||
|
|
Industry string `json:"industry"`
|
||
|
|
Style string `json:"style"`
|
||
|
|
DetailImage PPTThemeDetailImage `json:"detailImage"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// DetailImage 定义详细图片结构体
|
||
|
|
type PPTThemeDetailImage struct {
|
||
|
|
TitleCoverImageLarge string `json:"titleCoverImageLarge"`
|
||
|
|
TitleCoverImage string `json:"titleCoverImage"`
|
||
|
|
CatalogueCoverImage string `json:"catalogueCoverImage"`
|
||
|
|
ChapterCoverImage string `json:"chapterCoverImage"`
|
||
|
|
ContentCoverImage string `json:"contentCoverImage"`
|
||
|
|
EndCoverImage string `json:"endCoverImage"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type GetSparkPPTThemeReq struct {
|
||
|
|
Function string `json:"function" form:"function"` // 功能
|
||
|
|
Style string `json:"style" form:"style"` // 风格
|
||
|
|
Color string `json:"color" form:"color"` // 颜色
|
||
|
|
Industry string `json:"industry" form:"industry"` // 行业
|
||
|
|
PageNum int `json:"pageNum" form:"pageNum"` // 页码
|
||
|
|
PageSize int `json:"pageSize" form:"pageSize"` // 每页数量
|
||
|
|
}
|
||
|
|
|
||
|
|
type FileParamContext struct {
|
||
|
|
UserID int `json:"user_id"` //用户id
|
||
|
|
SessionID int `json:"session_id"` //会话id
|
||
|
|
FunctionID int `json:"function_id"` //功能id
|
||
|
|
ModelID int `json:"model_id"` //模型id
|
||
|
|
Channel string `json:"channel"` //消息队列
|
||
|
|
FileID int `json:"file_id"` //文件id
|
||
|
|
FileName string `json:"file_name"` //文件名
|
||
|
|
FileUrl string `json:"file_url"` //文件url
|
||
|
|
}
|
||
|
|
|
||
|
|
type SparkCreateOutlineByDocRequest struct {
|
||
|
|
Query string `json:"query" form:"query" binding:"required,min=1,max=8000,nefield= "` // 查询内容
|
||
|
|
FileUrl string `json:"fileUrl" form:"fileUrl"`
|
||
|
|
FileName string `json:"fileName" form:"fileName"`
|
||
|
|
BusinessId string `json:"businessId,omitempty" form:"businessId,omitempty"`
|
||
|
|
Language string `json:"language,omitempty" form:"language,omitempty" default:"cn"`
|
||
|
|
Search bool `json:"search,omitempty" form:"search,omitempty" default:"false"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// 创建大纲响应内容
|
||
|
|
type SparkCreateOutlineResponse struct {
|
||
|
|
Flag bool `json:"flag"`
|
||
|
|
Code int `json:"code"`
|
||
|
|
Desc string `json:"desc"`
|
||
|
|
Count int `json:"count"`
|
||
|
|
Data SparkCreateOutlineResponseData `json:"data"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// Data 定义响应中 data 字段的结构体
|
||
|
|
type SparkCreateOutlineResponseData struct {
|
||
|
|
Sid string `json:"sid"`
|
||
|
|
Outline SparkCreateOutlineResponseOutline `json:"outline"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// Outline 定义大纲数据的结构体
|
||
|
|
type SparkCreateOutlineResponseOutline struct {
|
||
|
|
Title string `json:"title"`
|
||
|
|
SubTitle string `json:"subTitle"`
|
||
|
|
Chapters []SparkCreateOutlineResponseChapter `json:"chapters"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// Chapter 定义章节数据的结构体
|
||
|
|
type SparkCreateOutlineResponseChapter struct {
|
||
|
|
ChapterTitle string `json:"chapterTitle"`
|
||
|
|
ChapterContents []SparkCreateOutlineResponseChapterContent `json:"chapterContents"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type SparkCreateOutlineResponseChapterContent struct {
|
||
|
|
ChapterTitle string `json:"chapterTitle"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type SparkCreateOutlineRequest struct {
|
||
|
|
Function string `json:"function" form:"function"` // 功能
|
||
|
|
Query string `json:"query" form:"query"` // 查询内容
|
||
|
|
FileUrl string `json:"fileUrl" form:"fileUrl"` // 文件url
|
||
|
|
FileName string `json:"fileName" form:"fileName"` // 文件名
|
||
|
|
}
|
||
|
|
|
||
|
|
type SparkCreatePPTByOutlineUserRequest struct {
|
||
|
|
Function string `json:"function" form:"function"` // 功能
|
||
|
|
Sid string `json:"sid" form:"sid"` // 会话id,spark提供
|
||
|
|
Query string `json:"query" form:"query"` // 查询内容
|
||
|
|
FileUrl string `json:"fileUrl" form:"fileUrl"` // 文件url
|
||
|
|
FileName string `json:"fileName" form:"fileName"` // 文件名
|
||
|
|
Outline SparkCreateOutlineResponseOutline `json:"outline" form:"outline"` // 大纲
|
||
|
|
}
|
||
|
|
|
||
|
|
type SparkCreatePptByOutlineRequest struct {
|
||
|
|
Query string `json:"query" form:"query" binding:"required,min=1,max=8000,nefield= "`
|
||
|
|
OutlineSid string `json:"outlineSid" form:"outlineSid"`
|
||
|
|
Outline SparkCreateOutlineResponseOutline `json:"outline" form:"outline" binding:"required"`
|
||
|
|
TemplateId string `json:"templateId" form:"templateId"`
|
||
|
|
BusinessId string `json:"businessId" form:"businessId"`
|
||
|
|
Author string `json:"author" form:"author" default:"讯飞智文"`
|
||
|
|
IsCardNote bool `json:"isCardNote" form:"isCardNote" default:"false"`
|
||
|
|
Search bool `json:"search" form:"search" default:"false"`
|
||
|
|
Language string `json:"language" form:"language" default:"cn"`
|
||
|
|
FileUrl string `json:"fileUrl" form:"fileUrl"`
|
||
|
|
FileName string `json:"fileName" form:"fileName" binding:"required_with=FileUrl"`
|
||
|
|
IsFigure bool `json:"isFigure" form:"isFigure" default:"false"`
|
||
|
|
AiImage string `json:"aiImage" form:"aiImage" binding:"omitempty,oneof=normal advanced"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type SparkCreatePPTByOutlineResponse struct {
|
||
|
|
Flag bool `json:"flag"`
|
||
|
|
Code int `json:"code"`
|
||
|
|
Desc string `json:"desc"`
|
||
|
|
Count interface{} `json:"count"`
|
||
|
|
Data SparkCreatePPTByOutlineData `json:"data"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type SparkCreatePPTByOutlineData struct {
|
||
|
|
PptStatus string `json:"pptStatus"`
|
||
|
|
AiImageStatus string `json:"aiImageStatus"`
|
||
|
|
CardNoteStatus string `json:"cardNoteStatus"`
|
||
|
|
PptUrl string `json:"pptUrl"`
|
||
|
|
ErrMsg interface{} `json:"errMsg"`
|
||
|
|
TotalPages int `json:"totalPages"`
|
||
|
|
DonePages int `json:"donePages"`
|
||
|
|
}
|