当前位置: 首页 > news >正文

hm网上商城东莞seo建站费用

hm网上商城,东莞seo建站费用,蓝天采集 wordpress,凡客登录入口写在前面 今天用C#调用了一下腾讯混元大模型#xff0c;调用代码贴一下#xff0c;具体的效果等深入使用后再来评价。 GitHub - TencentCloud/tencentcloud-sdk-dotnet: Tencent Cloud API 3.0 SDK for .NET 腾讯混元大模型简介_腾讯混元大模型购买指南_腾讯混元大模型操作…写在前面 今天用C#调用了一下腾讯混元大模型调用代码贴一下具体的效果等深入使用后再来评价。 GitHub - TencentCloud/tencentcloud-sdk-dotnet: Tencent Cloud API 3.0 SDK for .NET 腾讯混元大模型简介_腾讯混元大模型购买指南_腾讯混元大模型操作指南-腾讯云 (tencent.com) 代码实现 using Newtonsoft.Json; using System; using System.Threading.Tasks; using TencentCloud.Common; using TencentCloud.Common.Profile; using TencentCloud.Cvm.V20170312; using TencentCloud.Cvm.V20170312.Models; using TencentCloud.Cwp.V20180228; using TencentCloud.Hunyuan.V20230901; using TencentCloud.Hunyuan.V20230901.Models;namespace TencentCloudExamples {class Sample{static void Main(string[] args){// 实例化一个认证对象入参需要传入腾讯云账户 SecretId 和 SecretKey此处还需注意密钥对的保密// 代码泄露可能会导致 SecretId 和 SecretKey 泄露并威胁账号下所有资源的安全性。以下代码示例仅供参考建议采用更安全的方式来使用密钥请参见https://cloud.tencent.com/document/product/1278/85305// 密钥可前往官网控制台 https://console.cloud.tencent.com/cam/capi 进行获取Credential cred new Credential{SecretId xxx,SecretKey xxx};GetChatStd(cred);}private static string GetRegionTest(Credential cred){try{// 实例化一个client选项可选的没有特殊需求可以跳过ClientProfile clientProfile new ClientProfile();// 实例化一个http选项可选的没有特殊需求可以跳过HttpProfile httpProfile new HttpProfile();httpProfile.Endpoint (cvm.tencentcloudapi.com);clientProfile.HttpProfile httpProfile;// 实例化要请求产品的client对象,clientProfile是可选的CvmClient client new CvmClient(cred, , clientProfile);// 实例化一个请求对象,每个接口都会对应一个request对象DescribeRegionsRequest req new DescribeRegionsRequest();// 返回的resp是一个DescribeRegionsResponse的实例与请求对象对应var resp client.DescribeRegions(req);resp.Wait();var result resp.Result;if (result.RegionSet.Length 0){var firstRegion result.RegionSet[0];Console.WriteLine(firstRegion.Region);return firstRegion.Region;}// 输出json格式的字符串回包//Console.WriteLine(AbstractModel.ToJsonString(result));}catch (Exception e){Console.WriteLine(e.ToString());}return string.Empty;}private static void GetChatStd(Credential cred){try{// 实例化一个client选项可选的没有特殊需求可以跳过ClientProfile clientProfile new ClientProfile();// 实例化一个http选项可选的没有特殊需求可以跳过HttpProfile httpProfile new HttpProfile();httpProfile.Endpoint (hunyuan.tencentcloudapi.com);clientProfile.HttpProfile httpProfile;var region GetRegionTest(cred);// 实例化要请求产品的client对象,clientProfile是可选的HunyuanClient client new HunyuanClient(cred, region, clientProfile);实例化一个请求对象,每个接口都会对应一个request对象//GetTokenCountRequest req new GetTokenCountRequest();//req.Prompt 我是谁;返回的resp是一个GetTokenCountResponse的实例与请求对象对应//GetTokenCountResponse resp client.GetTokenCountSync(req);输出json格式的字符串回包//Console.WriteLine(AbstractModel.ToJsonString(resp));var req new ChatStdRequest();Message[] messages { new Message() { Role user, Content 写一个二分法算法 } };req.Messages messages;req.TopP 0;req.Temperature 1;var rsp client.ChatStdSync(req);foreach (var item in rsp){var ob JsonConvert.DeserializeObjectResultItem(item.Data);foreach (var choicesItem in ob.Choices){Console.Write(choicesItem.Delta.Content);}}Console.WriteLine();Console.WriteLine(---回答结束---);}catch (Exception e){Console.WriteLine(e.ToString());}Console.Read();}}public class Delta{public string Role { get; set; }public string Content { get; set; }}public class ChoicesItem{public string FinishReason { get; set; }public Delta Delta { get; set; }}public class Usage{public int PromptTokens { get; set; }public int CompletionTokens { get; set; }public int TotalTokens { get; set; }}public class ResultItem{public string Note { get; set; }public ListChoicesItem Choices { get; set; }public int Created { get; set; }public string Id { get; set; }public Usage Usage { get; set; }}}调用结果
http://www.pierceye.com/news/542765/

相关文章:

  • js网站访问计数ui网上接单网站
  • 西安优秀高端网站建设服务商国外网站阻止国内访问怎么做
  • 招生型网站建设不用js做网站
  • 网站正能量视频不懂我意思吧wordpress readme
  • 石家庄网站seo优化站长工具ip地址
  • 网站运行速度慢一个网站做三页是什么意思
  • wordpress视频网站企炬网站
  • 做数据收集网站租一个服务器多少钱
  • 苏州网站制作推广网站改版 删除栏目
  • 电子商务网站开发需求文档怎样建自己的网站
  • 通过关键词优化提升企业网站个人 可以做网站备案吗
  • 山西百度公司做网站的网站监控的软件怎么做
  • 如何做一份企业网站网站调用微博
  • 电子商务网站的设计工具wordpress中文用户名
  • 网站免费下载软件软件著作权申请多少钱一个
  • 东莞网站视频网站建设和管理规则
  • 内网网站建设方案wordpress 开发主题
  • 咸阳网站建设联系电话星悦做任务网站是
  • 家居网站建设的背景及意义免费域名注册官网
  • 桂林网站制作多少钱排名优化seo
  • 将网站保存怎么做wordpress 后台菜单
  • 2.0网站线上建设什么意思做外贸网站哪家的好
  • 网站域名可以更改吗安装wordpress插件目录下
  • 海南省澄迈住房和城乡建设厅网站ui设计师创意平台
  • 青岛网站设计公司排名wordpress 下载主题
  • 外包做网站不满意中级经济师考试成绩查询
  • 苏州企业网站建站系统网页制作基础步骤
  • 新河网站规划电子商务网站流程
  • 免费网站建设免代码杭州建设工程交易平台
  • 网页网站导读怎么做百度问答兼职怎么做