You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

118 lines
4.6 KiB

  1. // @Title Golang SDK Client
  2. // @Description This code is auto generated
  3. // @Author Ecloud SDK
  4. package model
  5. import (
  6. "gitlab.ecloud.com/ecloud/ecloudsdkcore/utils"
  7. )
  8. type GetDocumentResponseIndexConfigDocumentFormEnum string
  9. // List of DocumentForm
  10. const (
  11. GetDocumentResponseIndexConfigDocumentFormEnumQa GetDocumentResponseIndexConfigDocumentFormEnum = "QA"
  12. GetDocumentResponseIndexConfigDocumentFormEnumText GetDocumentResponseIndexConfigDocumentFormEnum = "TEXT"
  13. )
  14. type GetDocumentResponseIndexConfigExtractModeEnum string
  15. // List of ExtractMode
  16. const (
  17. GetDocumentResponseIndexConfigExtractModeEnumFast GetDocumentResponseIndexConfigExtractModeEnum = "FAST"
  18. GetDocumentResponseIndexConfigExtractModeEnumPrecise GetDocumentResponseIndexConfigExtractModeEnum = "PRECISE"
  19. )
  20. type GetDocumentResponseIndexConfigProcessModeEnum string
  21. // List of ProcessMode
  22. const (
  23. GetDocumentResponseIndexConfigProcessModeEnumAutomatic GetDocumentResponseIndexConfigProcessModeEnum = "AUTOMATIC"
  24. GetDocumentResponseIndexConfigProcessModeEnumCustom GetDocumentResponseIndexConfigProcessModeEnum = "CUSTOM"
  25. GetDocumentResponseIndexConfigProcessModeEnumByLine GetDocumentResponseIndexConfigProcessModeEnum = "BY_LINE"
  26. GetDocumentResponseIndexConfigProcessModeEnumQaForm GetDocumentResponseIndexConfigProcessModeEnum = "QA_FORM"
  27. GetDocumentResponseIndexConfigProcessModeEnumSemantic GetDocumentResponseIndexConfigProcessModeEnum = "SEMANTIC"
  28. GetDocumentResponseIndexConfigProcessModeEnumSmart GetDocumentResponseIndexConfigProcessModeEnum = "SMART"
  29. GetDocumentResponseIndexConfigProcessModeEnumHierarchical GetDocumentResponseIndexConfigProcessModeEnum = "HIERARCHICAL"
  30. GetDocumentResponseIndexConfigProcessModeEnumImageText GetDocumentResponseIndexConfigProcessModeEnum = "IMAGE_TEXT"
  31. )
  32. type GetDocumentResponseIndexConfig struct {
  33. // 文档形式(QA 拆分时传:QA,原始文档已为 QA 形式时不适用)
  34. DocumentForm *GetDocumentResponseIndexConfigDocumentFormEnum `json:"documentForm,omitempty"`
  35. // 解析规则,快速解析:FAST,精准解析:PRECISE
  36. ExtractMode *GetDocumentResponseIndexConfigExtractModeEnum `json:"extractMode,omitempty"`
  37. // 分段规则
  38. Segmentation *GetDocumentResponseSegmentation `json:"segmentation,omitempty"`
  39. // 文档的(分段索引)处理模式,默认切分:AUTOMATIC, 自定义切分:CUSTOM, 按行切分:BY_LINE, QA问答对:QA_FORM, 语义切分:SEMANTIC, 智能切分:SMART, 按层级切分:HIERARCHICAL, 多模态:IMAGE_TEXT
  40. ProcessMode *GetDocumentResponseIndexConfigProcessModeEnum `json:"processMode,omitempty"`
  41. }
  42. func (s GetDocumentResponseIndexConfig) String() string {
  43. return utils.Beautify(s)
  44. }
  45. func (s GetDocumentResponseIndexConfig) GoString() string {
  46. return s.String()
  47. }
  48. func (s GetDocumentResponseIndexConfig) ToJsonString() string {
  49. return utils.ToJsonString(s)
  50. }
  51. func (s *GetDocumentResponseIndexConfig) SetDocumentForm(v GetDocumentResponseIndexConfigDocumentFormEnum) *GetDocumentResponseIndexConfig {
  52. s.DocumentForm = &v
  53. return s
  54. }
  55. func (s *GetDocumentResponseIndexConfig) SetExtractMode(v GetDocumentResponseIndexConfigExtractModeEnum) *GetDocumentResponseIndexConfig {
  56. s.ExtractMode = &v
  57. return s
  58. }
  59. func (s *GetDocumentResponseIndexConfig) SetSegmentation(v *GetDocumentResponseSegmentation) *GetDocumentResponseIndexConfig {
  60. s.Segmentation = v
  61. return s
  62. }
  63. func (s *GetDocumentResponseIndexConfig) SetProcessMode(v GetDocumentResponseIndexConfigProcessModeEnum) *GetDocumentResponseIndexConfig {
  64. s.ProcessMode = &v
  65. return s
  66. }
  67. type GetDocumentResponseIndexConfigBuilder struct {
  68. s *GetDocumentResponseIndexConfig
  69. }
  70. func NewGetDocumentResponseIndexConfigBuilder() *GetDocumentResponseIndexConfigBuilder {
  71. s := &GetDocumentResponseIndexConfig{}
  72. b := &GetDocumentResponseIndexConfigBuilder{s: s}
  73. return b
  74. }
  75. func (b *GetDocumentResponseIndexConfigBuilder) DocumentForm(v GetDocumentResponseIndexConfigDocumentFormEnum) *GetDocumentResponseIndexConfigBuilder {
  76. b.s.DocumentForm = &v
  77. return b
  78. }
  79. func (b *GetDocumentResponseIndexConfigBuilder) ExtractMode(v GetDocumentResponseIndexConfigExtractModeEnum) *GetDocumentResponseIndexConfigBuilder {
  80. b.s.ExtractMode = &v
  81. return b
  82. }
  83. func (b *GetDocumentResponseIndexConfigBuilder) Segmentation(v *GetDocumentResponseSegmentation) *GetDocumentResponseIndexConfigBuilder {
  84. b.s.Segmentation = v
  85. return b
  86. }
  87. func (b *GetDocumentResponseIndexConfigBuilder) ProcessMode(v GetDocumentResponseIndexConfigProcessModeEnum) *GetDocumentResponseIndexConfigBuilder {
  88. b.s.ProcessMode = &v
  89. return b
  90. }
  91. func (b *GetDocumentResponseIndexConfigBuilder) Build() *GetDocumentResponseIndexConfig {
  92. return b.s
  93. }