tencentcloud-sdk-cloudmate 3.0.1192
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/VERSION +1 -0
- data/lib/tencentcloud-sdk-cloudmate.rb +11 -0
- data/lib/v20251030/client.rb +61 -0
- data/lib/v20251030/models.rb +161 -0
- metadata +66 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 5cbbb16ecedb2d4a8586976146f43ccec7dc9957
|
|
4
|
+
data.tar.gz: 20faca6028056792f9534dfd7271e7cfc45e3d16
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: e32c34be2c560eae9790314a8e9a536cf4c0f8d545a2aeed2f703b3698935da21ccc591c3da1edebf6aeb3ce695ba53fd88c9cf6c7a55d4b4c6b1f3460959217
|
|
7
|
+
data.tar.gz: e13e9983a29484d485ea8657b8aa8f5d7e1daddc5b8a1e7ece4be54a8ef7d456c87d328e8053eb44cd4c8a4f8062d8fee3ef192bfe336145adffab9cfa647600
|
data/lib/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.0.1192
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2017-2025 Tencent. All Rights Reserved.
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
require 'json'
|
|
18
|
+
|
|
19
|
+
module TencentCloud
|
|
20
|
+
module Cloudmate
|
|
21
|
+
module V20251030
|
|
22
|
+
class Client < TencentCloud::Common::AbstractClient
|
|
23
|
+
|
|
24
|
+
def initialize(credential, region, profile = nil)
|
|
25
|
+
api_version = '2025-10-30'
|
|
26
|
+
api_endpoint = 'cloudmate.tencentcloudapi.com'
|
|
27
|
+
sdk_version = 'CLOUDMATE_' + File.read(File.expand_path('../VERSION', __dir__)).strip
|
|
28
|
+
super(credential, region, api_version, api_endpoint, sdk_version, profile)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# 发起智能诊断对话
|
|
33
|
+
# 注意:使用该API时,请务必设置请求域名(Endpoint)为 cloudmate.ai.tencentcloudapi.com
|
|
34
|
+
|
|
35
|
+
# @param request: Request instance for CloudMateAgent.
|
|
36
|
+
# @type request: :class:`Tencentcloud::cloudmate::V20251030::CloudMateAgentRequest`
|
|
37
|
+
# @rtype: :class:`Tencentcloud::cloudmate::V20251030::CloudMateAgentResponse`
|
|
38
|
+
def CloudMateAgent(request)
|
|
39
|
+
body = send_request('CloudMateAgent', request.serialize)
|
|
40
|
+
response = JSON.parse(body)
|
|
41
|
+
if response['Response'].key?('Error') == false
|
|
42
|
+
model = CloudMateAgentResponse.new
|
|
43
|
+
model.deserialize(response['Response'])
|
|
44
|
+
model
|
|
45
|
+
else
|
|
46
|
+
code = response['Response']['Error']['Code']
|
|
47
|
+
message = response['Response']['Error']['Message']
|
|
48
|
+
reqid = response['Response']['RequestId']
|
|
49
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
50
|
+
end
|
|
51
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
52
|
+
raise e
|
|
53
|
+
rescue StandardError => e
|
|
54
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2017-2025 Tencent. All Rights Reserved.
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
module TencentCloud
|
|
18
|
+
module Cloudmate
|
|
19
|
+
module V20251030
|
|
20
|
+
# 智能诊断结果内容结构
|
|
21
|
+
class ChatContent < TencentCloud::Common::AbstractModel
|
|
22
|
+
# @param Role: 角色,可选值:
|
|
23
|
+
# - user
|
|
24
|
+
# - model_thinking
|
|
25
|
+
# - model_output
|
|
26
|
+
# - knowledge
|
|
27
|
+
# @type Role: String
|
|
28
|
+
# @param Parts: 内容分片
|
|
29
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
|
30
|
+
# @type Parts: Array
|
|
31
|
+
|
|
32
|
+
attr_accessor :Role, :Parts
|
|
33
|
+
|
|
34
|
+
def initialize(role=nil, parts=nil)
|
|
35
|
+
@Role = role
|
|
36
|
+
@Parts = parts
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def deserialize(params)
|
|
40
|
+
@Role = params['Role']
|
|
41
|
+
unless params['Parts'].nil?
|
|
42
|
+
@Parts = []
|
|
43
|
+
params['Parts'].each do |i|
|
|
44
|
+
chateventcontentpart_tmp = ChatEventContentPart.new
|
|
45
|
+
chateventcontentpart_tmp.deserialize(i)
|
|
46
|
+
@Parts << chateventcontentpart_tmp
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# 智能诊断时间内容分片结构
|
|
53
|
+
class ChatEventContentPart < TencentCloud::Common::AbstractModel
|
|
54
|
+
# @param Text: 文本内容(流式或完整)
|
|
55
|
+
# @type Text: String
|
|
56
|
+
# @param FunctionCall: 函数调用信息
|
|
57
|
+
# @type FunctionCall: String
|
|
58
|
+
# @param FunctionResponse: 函数返回结果
|
|
59
|
+
# @type FunctionResponse: String
|
|
60
|
+
|
|
61
|
+
attr_accessor :Text, :FunctionCall, :FunctionResponse
|
|
62
|
+
|
|
63
|
+
def initialize(text=nil, functioncall=nil, functionresponse=nil)
|
|
64
|
+
@Text = text
|
|
65
|
+
@FunctionCall = functioncall
|
|
66
|
+
@FunctionResponse = functionresponse
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def deserialize(params)
|
|
70
|
+
@Text = params['Text']
|
|
71
|
+
@FunctionCall = params['FunctionCall']
|
|
72
|
+
@FunctionResponse = params['FunctionResponse']
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# CloudMateAgent请求参数结构体
|
|
77
|
+
class CloudMateAgentRequest < TencentCloud::Common::AbstractModel
|
|
78
|
+
# @param WorkspaceId: 空间 ID
|
|
79
|
+
# @type WorkspaceId: String
|
|
80
|
+
# @param Message: 用户提问内容
|
|
81
|
+
# @type Message: String
|
|
82
|
+
# @param ScenarioId: 场景 ID
|
|
83
|
+
# @type ScenarioId: String
|
|
84
|
+
# @param SessionId: 会话 ID
|
|
85
|
+
|
|
86
|
+
# - 填写上一次接口调用返回的会话 ID(SessionId),可在原有会话基础上继续对话
|
|
87
|
+
# - 未填写会话 ID 时,创建新会话
|
|
88
|
+
# @type SessionId: String
|
|
89
|
+
# @param Streaming: 是否使用流式响应,默认为 false,不启用流式响应
|
|
90
|
+
# @type Streaming: Boolean
|
|
91
|
+
|
|
92
|
+
attr_accessor :WorkspaceId, :Message, :ScenarioId, :SessionId, :Streaming
|
|
93
|
+
|
|
94
|
+
def initialize(workspaceid=nil, message=nil, scenarioid=nil, sessionid=nil, streaming=nil)
|
|
95
|
+
@WorkspaceId = workspaceid
|
|
96
|
+
@Message = message
|
|
97
|
+
@ScenarioId = scenarioid
|
|
98
|
+
@SessionId = sessionid
|
|
99
|
+
@Streaming = streaming
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
def deserialize(params)
|
|
103
|
+
@WorkspaceId = params['WorkspaceId']
|
|
104
|
+
@Message = params['Message']
|
|
105
|
+
@ScenarioId = params['ScenarioId']
|
|
106
|
+
@SessionId = params['SessionId']
|
|
107
|
+
@Streaming = params['Streaming']
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# CloudMateAgent返回参数结构体
|
|
112
|
+
class CloudMateAgentResponse < TencentCloud::Common::AbstractModel
|
|
113
|
+
# @param SessionId: 会话ID,用于后续继续对话
|
|
114
|
+
# @type SessionId: String
|
|
115
|
+
# @param Timestamp: unix时间戳
|
|
116
|
+
# @type Timestamp: Integer
|
|
117
|
+
# @param Content: 诊断内容
|
|
118
|
+
# @type Content: :class:`Tencentcloud::Cloudmate.v20251030.models.ChatContent`
|
|
119
|
+
# @param Partial: 是否为部分内容(流式场景)
|
|
120
|
+
# @type Partial: Boolean
|
|
121
|
+
# @param TurnComplete: 本轮对话是否完成
|
|
122
|
+
# @type TurnComplete: Boolean
|
|
123
|
+
# @param ErrorCode: 错误代码,无错误时无该字段
|
|
124
|
+
# @type ErrorCode: String
|
|
125
|
+
# @param ErrorMessage: 错误详细信息,无错误时无该字段
|
|
126
|
+
# @type ErrorMessage: String
|
|
127
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。本接口为流式响应接口,当请求成功时,RequestId 会被放在 HTTP 响应的 Header "X-TC-RequestId" 中。
|
|
128
|
+
# @type RequestId: String
|
|
129
|
+
|
|
130
|
+
attr_accessor :SessionId, :Timestamp, :Content, :Partial, :TurnComplete, :ErrorCode, :ErrorMessage, :RequestId
|
|
131
|
+
|
|
132
|
+
def initialize(sessionid=nil, timestamp=nil, content=nil, partial=nil, turncomplete=nil, errorcode=nil, errormessage=nil, requestid=nil)
|
|
133
|
+
@SessionId = sessionid
|
|
134
|
+
@Timestamp = timestamp
|
|
135
|
+
@Content = content
|
|
136
|
+
@Partial = partial
|
|
137
|
+
@TurnComplete = turncomplete
|
|
138
|
+
@ErrorCode = errorcode
|
|
139
|
+
@ErrorMessage = errormessage
|
|
140
|
+
@RequestId = requestid
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
def deserialize(params)
|
|
144
|
+
@SessionId = params['SessionId']
|
|
145
|
+
@Timestamp = params['Timestamp']
|
|
146
|
+
unless params['Content'].nil?
|
|
147
|
+
@Content = ChatContent.new
|
|
148
|
+
@Content.deserialize(params['Content'])
|
|
149
|
+
end
|
|
150
|
+
@Partial = params['Partial']
|
|
151
|
+
@TurnComplete = params['TurnComplete']
|
|
152
|
+
@ErrorCode = params['ErrorCode']
|
|
153
|
+
@ErrorMessage = params['ErrorMessage']
|
|
154
|
+
@RequestId = params['RequestId']
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
|
metadata
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: tencentcloud-sdk-cloudmate
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 3.0.1192
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Tencent Cloud
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2025-12-29 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: tencentcloud-sdk-common
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ~>
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '3.0'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ~>
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '3.0'
|
|
27
|
+
description: Tencent Cloud Ruby SDK is the official software development kit, which
|
|
28
|
+
allows Ruby developers to write software that makes use of Tencent Cloud service
|
|
29
|
+
CLOUDMATE.
|
|
30
|
+
email:
|
|
31
|
+
- tencentcloudapi@tencent.com
|
|
32
|
+
executables: []
|
|
33
|
+
extensions: []
|
|
34
|
+
extra_rdoc_files: []
|
|
35
|
+
files:
|
|
36
|
+
- lib/tencentcloud-sdk-cloudmate.rb
|
|
37
|
+
- lib/v20251030/client.rb
|
|
38
|
+
- lib/v20251030/models.rb
|
|
39
|
+
- lib/VERSION
|
|
40
|
+
homepage: https://github.com/TencentCloud/tencentcloud-sdk-ruby
|
|
41
|
+
licenses:
|
|
42
|
+
- Apache-2.0
|
|
43
|
+
metadata:
|
|
44
|
+
source_code_uri: https://github.com/TencentCloud/tencentcloud-sdk-ruby/tencentcloud-sdk-cloudmate
|
|
45
|
+
changelog_uri: https://github.com/TencentCloud/tencentcloud-sdk-ruby/blob/master/CHANGELOG.md
|
|
46
|
+
post_install_message:
|
|
47
|
+
rdoc_options: []
|
|
48
|
+
require_paths:
|
|
49
|
+
- lib
|
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - '>='
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
55
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
56
|
+
requirements:
|
|
57
|
+
- - '>='
|
|
58
|
+
- !ruby/object:Gem::Version
|
|
59
|
+
version: '0'
|
|
60
|
+
requirements: []
|
|
61
|
+
rubyforge_project:
|
|
62
|
+
rubygems_version: 2.0.14
|
|
63
|
+
signing_key:
|
|
64
|
+
specification_version: 4
|
|
65
|
+
summary: Tencent Cloud SDK for Ruby - CLOUDMATE
|
|
66
|
+
test_files: []
|