tencentcloud-sdk-python-es 3.0.1459__tar.gz → 3.0.1460__tar.gz
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.
- {tencentcloud-sdk-python-es-3.0.1459 → tencentcloud-sdk-python-es-3.0.1460}/PKG-INFO +1 -1
- {tencentcloud-sdk-python-es-3.0.1459 → tencentcloud-sdk-python-es-3.0.1460}/setup.py +1 -1
- {tencentcloud-sdk-python-es-3.0.1459 → tencentcloud-sdk-python-es-3.0.1460}/tencentcloud/__init__.py +1 -1
- {tencentcloud-sdk-python-es-3.0.1459 → tencentcloud-sdk-python-es-3.0.1460}/tencentcloud/es/v20250101/models.py +171 -0
- {tencentcloud-sdk-python-es-3.0.1459 → tencentcloud-sdk-python-es-3.0.1460}/tencentcloud_sdk_python_es.egg-info/PKG-INFO +1 -1
- tencentcloud-sdk-python-es-3.0.1460/tencentcloud_sdk_python_es.egg-info/requires.txt +1 -0
- tencentcloud-sdk-python-es-3.0.1459/tencentcloud_sdk_python_es.egg-info/requires.txt +0 -1
- {tencentcloud-sdk-python-es-3.0.1459 → tencentcloud-sdk-python-es-3.0.1460}/README.rst +0 -0
- {tencentcloud-sdk-python-es-3.0.1459 → tencentcloud-sdk-python-es-3.0.1460}/setup.cfg +0 -0
- {tencentcloud-sdk-python-es-3.0.1459 → tencentcloud-sdk-python-es-3.0.1460}/tencentcloud/es/__init__.py +0 -0
- {tencentcloud-sdk-python-es-3.0.1459 → tencentcloud-sdk-python-es-3.0.1460}/tencentcloud/es/v20180416/__init__.py +0 -0
- {tencentcloud-sdk-python-es-3.0.1459 → tencentcloud-sdk-python-es-3.0.1460}/tencentcloud/es/v20180416/errorcodes.py +0 -0
- {tencentcloud-sdk-python-es-3.0.1459 → tencentcloud-sdk-python-es-3.0.1460}/tencentcloud/es/v20180416/es_client.py +0 -0
- {tencentcloud-sdk-python-es-3.0.1459 → tencentcloud-sdk-python-es-3.0.1460}/tencentcloud/es/v20180416/models.py +0 -0
- {tencentcloud-sdk-python-es-3.0.1459 → tencentcloud-sdk-python-es-3.0.1460}/tencentcloud/es/v20250101/__init__.py +0 -0
- {tencentcloud-sdk-python-es-3.0.1459 → tencentcloud-sdk-python-es-3.0.1460}/tencentcloud/es/v20250101/errorcodes.py +0 -0
- {tencentcloud-sdk-python-es-3.0.1459 → tencentcloud-sdk-python-es-3.0.1460}/tencentcloud/es/v20250101/es_client.py +0 -0
- {tencentcloud-sdk-python-es-3.0.1459 → tencentcloud-sdk-python-es-3.0.1460}/tencentcloud_sdk_python_es.egg-info/SOURCES.txt +0 -0
- {tencentcloud-sdk-python-es-3.0.1459 → tencentcloud-sdk-python-es-3.0.1460}/tencentcloud_sdk_python_es.egg-info/dependency_links.txt +0 -0
- {tencentcloud-sdk-python-es-3.0.1459 → tencentcloud-sdk-python-es-3.0.1460}/tencentcloud_sdk_python_es.egg-info/top_level.txt +0 -0
|
@@ -8,7 +8,7 @@ ROOT = os.path.dirname(__file__)
|
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
10
|
name='tencentcloud-sdk-python-es',
|
|
11
|
-
install_requires=["tencentcloud-sdk-python-common>=3.0.
|
|
11
|
+
install_requires=["tencentcloud-sdk-python-common>=3.0.1460,<4.0.0"],
|
|
12
12
|
version=tencentcloud.__version__,
|
|
13
13
|
description='Tencent Cloud Es SDK for Python',
|
|
14
14
|
long_description=open('README.rst').read(),
|
|
@@ -39,6 +39,12 @@ class ChatCompletionsRequest(AbstractModel):
|
|
|
39
39
|
:type OnlineSearch: bool
|
|
40
40
|
:param _OnlineSearchOptions: 当 OnlineSearch 为 true 时,指定的搜索引擎,默认为 bing。
|
|
41
41
|
:type OnlineSearchOptions: :class:`tencentcloud.es.v20250101.models.OnlineSearchOptions`
|
|
42
|
+
:param _Tools: 可调用的工具列表,当前支持模型:hunyuan-turbo, deepseek-v3。
|
|
43
|
+
:type Tools: list of Tool
|
|
44
|
+
:param _ToolChoice: 工具使用选项,可选值包括 none、auto、custom。说明:1. 仅对 hunyuan-turbo、deepseek-v3 模型生效。2. none:不调用工具;auto:模型自行选择生成回复或调用工具;custom:强制模型调用指定的工具。3. 未设置时,默认值为auto
|
|
45
|
+
:type ToolChoice: str
|
|
46
|
+
:param _CustomTool: 强制模型调用指定的工具,当参数ToolChoice为custom时,此参数为必填
|
|
47
|
+
:type CustomTool: :class:`tencentcloud.es.v20250101.models.Tool`
|
|
42
48
|
"""
|
|
43
49
|
self._Messages = None
|
|
44
50
|
self._ModelName = None
|
|
@@ -47,6 +53,9 @@ class ChatCompletionsRequest(AbstractModel):
|
|
|
47
53
|
self._Temperature = None
|
|
48
54
|
self._OnlineSearch = None
|
|
49
55
|
self._OnlineSearchOptions = None
|
|
56
|
+
self._Tools = None
|
|
57
|
+
self._ToolChoice = None
|
|
58
|
+
self._CustomTool = None
|
|
50
59
|
|
|
51
60
|
@property
|
|
52
61
|
def Messages(self):
|
|
@@ -125,6 +134,39 @@ class ChatCompletionsRequest(AbstractModel):
|
|
|
125
134
|
def OnlineSearchOptions(self, OnlineSearchOptions):
|
|
126
135
|
self._OnlineSearchOptions = OnlineSearchOptions
|
|
127
136
|
|
|
137
|
+
@property
|
|
138
|
+
def Tools(self):
|
|
139
|
+
r"""可调用的工具列表,当前支持模型:hunyuan-turbo, deepseek-v3。
|
|
140
|
+
:rtype: list of Tool
|
|
141
|
+
"""
|
|
142
|
+
return self._Tools
|
|
143
|
+
|
|
144
|
+
@Tools.setter
|
|
145
|
+
def Tools(self, Tools):
|
|
146
|
+
self._Tools = Tools
|
|
147
|
+
|
|
148
|
+
@property
|
|
149
|
+
def ToolChoice(self):
|
|
150
|
+
r"""工具使用选项,可选值包括 none、auto、custom。说明:1. 仅对 hunyuan-turbo、deepseek-v3 模型生效。2. none:不调用工具;auto:模型自行选择生成回复或调用工具;custom:强制模型调用指定的工具。3. 未设置时,默认值为auto
|
|
151
|
+
:rtype: str
|
|
152
|
+
"""
|
|
153
|
+
return self._ToolChoice
|
|
154
|
+
|
|
155
|
+
@ToolChoice.setter
|
|
156
|
+
def ToolChoice(self, ToolChoice):
|
|
157
|
+
self._ToolChoice = ToolChoice
|
|
158
|
+
|
|
159
|
+
@property
|
|
160
|
+
def CustomTool(self):
|
|
161
|
+
r"""强制模型调用指定的工具,当参数ToolChoice为custom时,此参数为必填
|
|
162
|
+
:rtype: :class:`tencentcloud.es.v20250101.models.Tool`
|
|
163
|
+
"""
|
|
164
|
+
return self._CustomTool
|
|
165
|
+
|
|
166
|
+
@CustomTool.setter
|
|
167
|
+
def CustomTool(self, CustomTool):
|
|
168
|
+
self._CustomTool = CustomTool
|
|
169
|
+
|
|
128
170
|
|
|
129
171
|
def _deserialize(self, params):
|
|
130
172
|
if params.get("Messages") is not None:
|
|
@@ -141,6 +183,16 @@ class ChatCompletionsRequest(AbstractModel):
|
|
|
141
183
|
if params.get("OnlineSearchOptions") is not None:
|
|
142
184
|
self._OnlineSearchOptions = OnlineSearchOptions()
|
|
143
185
|
self._OnlineSearchOptions._deserialize(params.get("OnlineSearchOptions"))
|
|
186
|
+
if params.get("Tools") is not None:
|
|
187
|
+
self._Tools = []
|
|
188
|
+
for item in params.get("Tools"):
|
|
189
|
+
obj = Tool()
|
|
190
|
+
obj._deserialize(item)
|
|
191
|
+
self._Tools.append(obj)
|
|
192
|
+
self._ToolChoice = params.get("ToolChoice")
|
|
193
|
+
if params.get("CustomTool") is not None:
|
|
194
|
+
self._CustomTool = Tool()
|
|
195
|
+
self._CustomTool._deserialize(params.get("CustomTool"))
|
|
144
196
|
memeber_set = set(params.keys())
|
|
145
197
|
for name, value in vars(self).items():
|
|
146
198
|
property_name = name[1:]
|
|
@@ -2310,6 +2362,59 @@ class TokenUsage(AbstractModel):
|
|
|
2310
2362
|
|
|
2311
2363
|
|
|
2312
2364
|
|
|
2365
|
+
class Tool(AbstractModel):
|
|
2366
|
+
r"""用户指定模型使用的工具
|
|
2367
|
+
|
|
2368
|
+
"""
|
|
2369
|
+
|
|
2370
|
+
def __init__(self):
|
|
2371
|
+
r"""
|
|
2372
|
+
:param _Type: 工具类型,当前只支持function
|
|
2373
|
+
:type Type: str
|
|
2374
|
+
:param _Function: 具体要调用的function
|
|
2375
|
+
:type Function: :class:`tencentcloud.es.v20250101.models.ToolFunction`
|
|
2376
|
+
"""
|
|
2377
|
+
self._Type = None
|
|
2378
|
+
self._Function = None
|
|
2379
|
+
|
|
2380
|
+
@property
|
|
2381
|
+
def Type(self):
|
|
2382
|
+
r"""工具类型,当前只支持function
|
|
2383
|
+
:rtype: str
|
|
2384
|
+
"""
|
|
2385
|
+
return self._Type
|
|
2386
|
+
|
|
2387
|
+
@Type.setter
|
|
2388
|
+
def Type(self, Type):
|
|
2389
|
+
self._Type = Type
|
|
2390
|
+
|
|
2391
|
+
@property
|
|
2392
|
+
def Function(self):
|
|
2393
|
+
r"""具体要调用的function
|
|
2394
|
+
:rtype: :class:`tencentcloud.es.v20250101.models.ToolFunction`
|
|
2395
|
+
"""
|
|
2396
|
+
return self._Function
|
|
2397
|
+
|
|
2398
|
+
@Function.setter
|
|
2399
|
+
def Function(self, Function):
|
|
2400
|
+
self._Function = Function
|
|
2401
|
+
|
|
2402
|
+
|
|
2403
|
+
def _deserialize(self, params):
|
|
2404
|
+
self._Type = params.get("Type")
|
|
2405
|
+
if params.get("Function") is not None:
|
|
2406
|
+
self._Function = ToolFunction()
|
|
2407
|
+
self._Function._deserialize(params.get("Function"))
|
|
2408
|
+
memeber_set = set(params.keys())
|
|
2409
|
+
for name, value in vars(self).items():
|
|
2410
|
+
property_name = name[1:]
|
|
2411
|
+
if property_name in memeber_set:
|
|
2412
|
+
memeber_set.remove(property_name)
|
|
2413
|
+
if len(memeber_set) > 0:
|
|
2414
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
2415
|
+
|
|
2416
|
+
|
|
2417
|
+
|
|
2313
2418
|
class ToolCall(AbstractModel):
|
|
2314
2419
|
r"""模型生成的工具调用
|
|
2315
2420
|
|
|
@@ -2444,6 +2549,72 @@ class ToolCallFunction(AbstractModel):
|
|
|
2444
2549
|
|
|
2445
2550
|
|
|
2446
2551
|
|
|
2552
|
+
class ToolFunction(AbstractModel):
|
|
2553
|
+
r"""function定义
|
|
2554
|
+
|
|
2555
|
+
"""
|
|
2556
|
+
|
|
2557
|
+
def __init__(self):
|
|
2558
|
+
r"""
|
|
2559
|
+
:param _Name: function名称,只能包含a-z,A-Z,0-9,_或-
|
|
2560
|
+
:type Name: str
|
|
2561
|
+
:param _Parameters: function参数,一般为json字符串
|
|
2562
|
+
:type Parameters: str
|
|
2563
|
+
:param _Description: function的简单描述
|
|
2564
|
+
:type Description: str
|
|
2565
|
+
"""
|
|
2566
|
+
self._Name = None
|
|
2567
|
+
self._Parameters = None
|
|
2568
|
+
self._Description = None
|
|
2569
|
+
|
|
2570
|
+
@property
|
|
2571
|
+
def Name(self):
|
|
2572
|
+
r"""function名称,只能包含a-z,A-Z,0-9,_或-
|
|
2573
|
+
:rtype: str
|
|
2574
|
+
"""
|
|
2575
|
+
return self._Name
|
|
2576
|
+
|
|
2577
|
+
@Name.setter
|
|
2578
|
+
def Name(self, Name):
|
|
2579
|
+
self._Name = Name
|
|
2580
|
+
|
|
2581
|
+
@property
|
|
2582
|
+
def Parameters(self):
|
|
2583
|
+
r"""function参数,一般为json字符串
|
|
2584
|
+
:rtype: str
|
|
2585
|
+
"""
|
|
2586
|
+
return self._Parameters
|
|
2587
|
+
|
|
2588
|
+
@Parameters.setter
|
|
2589
|
+
def Parameters(self, Parameters):
|
|
2590
|
+
self._Parameters = Parameters
|
|
2591
|
+
|
|
2592
|
+
@property
|
|
2593
|
+
def Description(self):
|
|
2594
|
+
r"""function的简单描述
|
|
2595
|
+
:rtype: str
|
|
2596
|
+
"""
|
|
2597
|
+
return self._Description
|
|
2598
|
+
|
|
2599
|
+
@Description.setter
|
|
2600
|
+
def Description(self, Description):
|
|
2601
|
+
self._Description = Description
|
|
2602
|
+
|
|
2603
|
+
|
|
2604
|
+
def _deserialize(self, params):
|
|
2605
|
+
self._Name = params.get("Name")
|
|
2606
|
+
self._Parameters = params.get("Parameters")
|
|
2607
|
+
self._Description = params.get("Description")
|
|
2608
|
+
memeber_set = set(params.keys())
|
|
2609
|
+
for name, value in vars(self).items():
|
|
2610
|
+
property_name = name[1:]
|
|
2611
|
+
if property_name in memeber_set:
|
|
2612
|
+
memeber_set.remove(property_name)
|
|
2613
|
+
if len(memeber_set) > 0:
|
|
2614
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
2615
|
+
|
|
2616
|
+
|
|
2617
|
+
|
|
2447
2618
|
class Usage(AbstractModel):
|
|
2448
2619
|
r"""token消耗总数
|
|
2449
2620
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
tencentcloud-sdk-python-common<4.0.0,>=3.0.1460
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
tencentcloud-sdk-python-common<4.0.0,>=3.0.1459
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|