public class ChatTranslationsRequest extends AbstractModel
header, skipSign
Constructor and Description |
---|
ChatTranslationsRequest() |
ChatTranslationsRequest(ChatTranslationsRequest source)
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
|
Modifier and Type | Method and Description |
---|---|
String |
getField()
Get 待翻译文本所属领域,例如游戏剧情等
|
String |
getModel()
Get 模型名称,可选值包括 hunyuan-translation、hunyuan-translation-lite。
各模型介绍请阅读 [产品概述](https://cloud.tencent.com/document/product/1729/104753) 中的说明。
注意:
不同的模型计费不同,请根据 [购买指南](https://cloud.tencent.com/document/product/1729/97731) 按需调用。
|
Reference[] |
getReferences()
Get 参考示例,最多10个
|
String |
getSource()
Get 源语言。
支持语言列表: 1.
|
Boolean |
getStream()
Get 流式调用开关。
说明:
1.
|
String |
getTarget()
Get 目标语言。
支持语言列表: 1.
|
String |
getText()
Get 待翻译的文本
|
void |
setField(String Field)
Set 待翻译文本所属领域,例如游戏剧情等
|
void |
setModel(String Model)
Set 模型名称,可选值包括 hunyuan-translation、hunyuan-translation-lite。
各模型介绍请阅读 [产品概述](https://cloud.tencent.com/document/product/1729/104753) 中的说明。
注意:
不同的模型计费不同,请根据 [购买指南](https://cloud.tencent.com/document/product/1729/97731) 按需调用。
|
void |
setReferences(Reference[] References)
Set 参考示例,最多10个
|
void |
setSource(String Source)
Set 源语言。
支持语言列表: 1.
|
void |
setStream(Boolean Stream)
Set 流式调用开关。
说明:
1.
|
void |
setTarget(String Target)
Set 目标语言。
支持语言列表: 1.
|
void |
setText(String Text)
Set 待翻译的文本
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, isStream, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonString
public ChatTranslationsRequest()
public ChatTranslationsRequest(ChatTranslationsRequest source)
public String getModel()
public void setModel(String Model)
Model
- 模型名称,可选值包括 hunyuan-translation、hunyuan-translation-lite。
各模型介绍请阅读 [产品概述](https://cloud.tencent.com/document/product/1729/104753) 中的说明。
注意:
不同的模型计费不同,请根据 [购买指南](https://cloud.tencent.com/document/product/1729/97731) 按需调用。public Boolean getStream()
public void setStream(Boolean Stream)
Stream
- 流式调用开关。
说明:
1. 未传值时默认为非流式调用(false)。
2. 流式调用时以 SSE 协议增量返回结果(返回值取 Choices[n].Delta 中的值,需要拼接增量数据才能获得完整结果)。
3. 非流式调用时:
调用方式与普通 HTTP 请求无异。
接口响应耗时较长,**如需更低时延建议设置为 true**。
只返回一次最终结果(返回值取 Choices[n].Message 中的值)。
注意:
通过 SDK 调用时,流式和非流式调用需用**不同的方式**获取返回值,具体参考 SDK 中的注释或示例(在各语言 SDK 代码仓库的 examples/hunyuan/v20230901/ 目录中)。public String getText()
public void setText(String Text)
Text
- 待翻译的文本public String getSource()
public void setSource(String Source)
Source
- 源语言。
支持语言列表: 1. 简体中文:zh,2. 粤语:yue,3. 英语:en,4. 法语:fr,5. 葡萄牙语:pt,6. 西班牙语:es,7. 日语:ja,8. 土耳其语:tr,9. 俄语:ru,10. 阿拉伯语:ar,11. 韩语:ko,12. 泰语:th,13. 意大利语:it,14. 德语:de,15. 越南语:vi,16. 马来语:ms,17. 印尼语:idpublic String getTarget()
public void setTarget(String Target)
Target
- 目标语言。
支持语言列表: 1. 简体中文:zh,2. 粤语:yue,3. 英语:en,4. 法语:fr,5. 葡萄牙语:pt,6. 西班牙语:es,7. 日语:ja,8. 土耳其语:tr,9. 俄语:ru,10. 阿拉伯语:ar,11. 韩语:ko,12. 泰语:th,13. 意大利语:it,14. 德语:de,15. 越南语:vi,16. 马来语:ms,17. 印尼语:idpublic String getField()
public void setField(String Field)
Field
- 待翻译文本所属领域,例如游戏剧情等public Reference[] getReferences()
public void setReferences(Reference[] References)
References
- 参考示例,最多10个Copyright © 2024. All rights reserved.