腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
文章/答案/技术大牛
搜索
搜索
关闭
发布
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
首页
标签
腾讯混元大模型
#
腾讯混元大模型
腾讯混元大模型
关注
专栏文章
(183)
技术视频
(10)
互动问答
(10)
怎样才能合理用好各类大模型?
0
回答
模型
、
腾讯混元大模型
、
玩转腾讯混元大模型
、
大模型知识引擎
大模型下,架构师应该怎么发展呢?
0
回答
架构师
、
模型
、
腾讯混元大模型
混元lite 怎么接入?
0
回答
腾讯混元大模型
混元生文获得的返回结果,如何解析?
0
回答
data
、
开发者
、
腾讯混元大模型
Python调用 混元大模型接口有时会出现下面的报错,是什么原因?
0
回答
python
、
接口
、
模型
、
腾讯混元大模型
混元大模型调用的api_url怎么获得?
0
回答
api
、
url
、
模型
、
腾讯混元大模型
混元大模型的api地址用什么请求实现后台推送数据,页面上自动打字的效果?
0
回答
https
、
后台
、
模型
、
数据
、
腾讯混元大模型
【自建Milvus单机版】的向量数据如何导入ES-8.1产品服务中?
0
回答
数据库
、
Elasticsearch Service
、
数据
、
向量数据库
、
腾讯混元大模型
腾讯混元使用sdk只返回请求ID?
1
回答
sdk
、
腾讯
、
腾讯混元大模型
杨不易呀
腾讯云TDP | KOL (已认证)
某知名大厂现任全栈工程师、Tencent开发者社区领袖/创作之星、Tencent TDP KOL
要不再试试看? 或者你贴出完整代码看看 /** * 高级版本对话 * author 杨不易呀 * @return {@link String} */ public static StringBuilder chatPro(String value) throws TencentCloudSDKException { Credential cred = new Credential(tencentHunYuanUtils.tencentConfig.getSecretId(), tencentHunYuanUtils.tencentConfig.getSecretKey()); ClientProfile clientProfile = new ClientProfile(); HunyuanClient client = new HunyuanClient(cred, "ap-guangzhou", clientProfile); ChatProRequest req = new ChatProRequest(); Message msg = new Message(); msg.setRole("user"); msg.setContent(value); req.setMessages(new Message[]{ msg }); final ChatProResponse chatPro = client.ChatPro(req); StringBuilder s = new StringBuilder(); for (SSEResponseModel.SSE e : chatPro) { final String data = e.Data; final ChatProResponse bean = JSONUtil.toBean(data, ChatProResponse.class); final Choice[] choices = bean.getChoices(); for (Choice choice : choices) { s.append(choice.getDelta().getContent()); } } return s; }...
展开详请
赞
0
收藏
0
评论
0
分享
要不再试试看? 或者你贴出完整代码看看 /** * 高级版本对话 * author 杨不易呀 * @return {@link String} */ public static StringBuilder chatPro(String value) throws TencentCloudSDKException { Credential cred = new Credential(tencentHunYuanUtils.tencentConfig.getSecretId(), tencentHunYuanUtils.tencentConfig.getSecretKey()); ClientProfile clientProfile = new ClientProfile(); HunyuanClient client = new HunyuanClient(cred, "ap-guangzhou", clientProfile); ChatProRequest req = new ChatProRequest(); Message msg = new Message(); msg.setRole("user"); msg.setContent(value); req.setMessages(new Message[]{ msg }); final ChatProResponse chatPro = client.ChatPro(req); StringBuilder s = new StringBuilder(); for (SSEResponseModel.SSE e : chatPro) { final String data = e.Data; final ChatProResponse bean = JSONUtil.toBean(data, ChatProResponse.class); final Choice[] choices = bean.getChoices(); for (Choice choice : choices) { s.append(choice.getDelta().getContent()); } } return s; }
混元大模型不能使用换行转译字符?
1
回答
java
、
message
、
模型
、
腾讯混元大模型
鹰瑶
腾讯云TDP | 产品KOL (已认证)
你是对接到哪里我企业微信 看了一下我的没问题啊 也不会是py写的啊问题 你再看看你代码是怎么写的 发个工单指导指导 图片 ...
展开详请
赞
0
收藏
0
评论
0
分享
你是对接到哪里我企业微信 看了一下我的没问题啊 也不会是py写的啊问题 你再看看你代码是怎么写的 发个工单指导指导 图片
相关
产品
腾讯混元大模型
腾讯混元大模型
热门
专栏
腾讯云开发者社区头条
448 文章
67.6K 订阅
黄希彤的专栏
37 文章
67 订阅
腾讯技术工程官方号的专栏
1.1K 文章
925 订阅
量子位
8.6K 文章
139 订阅
领券