public class HunyuanClient extends AbstractClient
gson, HTTP_RSP_OK, SDK_VERSION
Constructor and Description |
---|
HunyuanClient(Credential credential,
String region) |
HunyuanClient(Credential credential,
String region,
ClientProfile profile) |
Modifier and Type | Method and Description |
---|---|
ChatCompletionsResponse |
ChatCompletions(ChatCompletionsRequest req)
腾讯混元大模型是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。
1.
|
ChatProResponse |
ChatPro(ChatProRequest req)
注意:本接口将于 5 月 15 日下线;下线后将不再提供文档指引,接口本身可继续调用,建议使用 [hunyuan](https://cloud.tencent.com/document/api/1729/105701) 接入。
腾讯混元大模型(hunyuan-pro)是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。
1.
|
ChatStdResponse |
ChatStd(ChatStdRequest req)
注意:本接口将于 5 月 15 日下线;下线后将不再提供文档指引,接口本身可继续调用,建议使用 [hunyuan](https://cloud.tencent.com/document/api/1729/105701) 接入。
腾讯混元大模型标准版是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。
1.
|
GetEmbeddingResponse |
GetEmbedding(GetEmbeddingRequest req)
腾讯混元 Embedding 接口,可以将文本转化为高质量的向量数据。
|
GetTokenCountResponse |
GetTokenCount(GetTokenCountRequest req)
该接口用于计算文本对应Token数、字符数。
|
call, callOctetStream, getClientProfile, getCredential, getRegion, getRegionBreaker, internalRequest, internalRequest, internalRequestRaw, processResponseJson, processResponseSSE, retry, setClientProfile, setCredential, setRegion, setRegionBreaker
public HunyuanClient(Credential credential, String region)
public HunyuanClient(Credential credential, String region, ClientProfile profile)
public ChatCompletionsResponse ChatCompletions(ChatCompletionsRequest req) throws TencentCloudSDKException
req
- ChatCompletionsRequestTencentCloudSDKException
public ChatProResponse ChatPro(ChatProRequest req) throws TencentCloudSDKException
req
- ChatProRequestTencentCloudSDKException
public ChatStdResponse ChatStd(ChatStdRequest req) throws TencentCloudSDKException
req
- ChatStdRequestTencentCloudSDKException
public GetEmbeddingResponse GetEmbedding(GetEmbeddingRequest req) throws TencentCloudSDKException
req
- GetEmbeddingRequestTencentCloudSDKException
public GetTokenCountResponse GetTokenCount(GetTokenCountRequest req) throws TencentCloudSDKException
req
- GetTokenCountRequestTencentCloudSDKException
Copyright © 2024. All rights reserved.