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

建设工程招标专业网站做网站后的收获

建设工程招标专业网站,做网站后的收获,净水设备 技术支持 东莞网站建设,浙江网站建设营销本文将介绍如何通过 PHP 调用 Deepseek API,并通过简易代码展示如何与 Deepseek 的 AI 模型进行交互,帮助开发者更好地在自己的项目中应用这一强大的工具。我们将提供一个基本的 PHP 示例,帮助你快速了解如何通过 Deepseek API 进行调用。 以…

 本文将介绍如何通过 PHP 调用 Deepseek API,并通过简易代码展示如何与 Deepseek 的 AI 模型进行交互,帮助开发者更好地在自己的项目中应用这一强大的工具。我们将提供一个基本的 PHP 示例,帮助你快速了解如何通过 Deepseek API 进行调用。

以下是调用 Deepseek API 的 PHP 示例代码:

<?php
$content = file_get_contents("2025-02-12_14-48-33_2HY8G.txt");
$content = substr($content, 0, 50);  //测试代码是否正确时,可以改小一点,节省费用$api_key = 'sk-输入apikey';$url = 'https://api.deepseek.com/chat/completions';
$header = "Content-Type: application/json\nAuthorization: Bearer $api_key \n";$requestObj = new stdClass();
$requestObj->model = 'deepseek-chat';$response_format = new stdClass();$messages = [];
$message = new stdClass();
$message->role = 'system';
$message->content = '你是环保及绿色减排行业的数据分析专家';
$messages[] = $message;$message = new stdClass();
$message->role = 'user';
$message->content = <<<EOD
1、表格,如果碰到关键词Parameter,Uint,A1-A3,A4等,且这些关键词在同一行显示,也认为这是表格,含有这些关键词的那一行为表头,
"""$content"""
EOD;
$messages[] = $message;
$requestObj->messages = $messages;$request = json_encode($requestObj, JSON_UNESCAPED_UNICODE);
print_r($request);$opts = array('http' => ['method' => 'POST','header' => $header,'content' => $request,'timeout' => 300],'ssl' => ['verify_peer' => false,'verify_peer_name' => false]
);
$context = stream_context_create($opts);
$response = @file_get_contents($url, false, $context);//request格式不符合要求时,api会报错
if($response === false){var_dump($http_response_header);echo "\n\nerror\n";die();
}$responseObj = json_decode($response);
echo "\n\n\n";
print_r($response);
echo "\n\n\n";
print_r($responseObj);
echo "\n\n\n";
echo $responseObj->choices[0]->message->content;

返回结果如下:

{"Product": "ODE ISIPAN STD XPS Insulation Materials",  "EPD registration number": "S-P-03943",  "Publication date": "16.06.2021",  "Validity date": "15.05.2026",  "Region": "Global",  "Functional unit / declared unit": "1 m²K/W",  "Tables": [    {      "Product Name": "ODE ISIPAN STD XPS Insulation Materials",      "Region": "Global",      "Product thickness": "20-80",      "Product thickness unit": "mm",      "Product mass": "0.89",      "Product mass unit": "kg",      "Ingredients": {        "Unit/FU": "percent",        "Polystyrene": "80-90",        "Blowing Agents": "<12",        "Flame Retardent": "<1",        "Nucleating Agents": "<1",        "Additives": "<1"      },      "Production waste": [],      "Production Packaging": [],      "Installation": [        {          "Row header": "Adhesive mortar",          "Row unit": "4 kg/m²"        }      ],      "Installation waste": [],      "Installation packaging": [],      "Reference Service Life (RSL)": "Not specified",      "Cleaning and maintenance": [],      "End of Life": [        {          "Row1 header": "Disposal",          "Row1 unit": "Landfill"        }      ],      "Potential Environmental Impact": [        {          "Parameter": "GWP - Total",          "Col1 Unit Header": "kg CO₂ eq",          "Col1 header": "A1-A3",          "Col1 Value": "3.44",          "Col2 header": "A4",          "Col2 Value": "0.052",          "Col3 header": "A5",          "Col3 Value": "5.62",          "Col4 header": "C1",          "Col4 Value": "0.0",          "Col5 header": "C2",          "Col5 Value": "0.014",          "Col6 header": "C3",          "Col6 Value": "0.0",          "Col7 header": "C4",          "Col7 Value": "0.823",          "Col8 header": "D",          "Col8 Value": "-0.015"        },        {          "Parameter": "ODP",          "Col1 Unit Header": "kg CFC-11 eq",          "Col1 header": "A1-A3",          "Col1 Value": "0.00011",          "Col2 header": "A4",          "Col2 Value": "1.0E-9",          "Col3 header": "A5",          "Col3 Value": "537E-9",          "Col4 header": "C1",          "Col4 Value": "0.0",          "Col5 header": "C2",          "Col5 Value": "3.13E-9",          "Col6 header": "C3",          "Col6 Value": "0.0",          "Col7 header": "C4",          "Col7 Value": "3.10E-9",          "Col8 header": "D",          "Col8 Value": "-486E-12"        },        {          "Parameter": "AP",          "Col1 Unit Header": "mol H+ eq",          "Col1 header": "A1-A3",          "Col1 Value": "0.014",          "Col2 header": "A4",          "Col2 Value": "0.001",          "Col3 header": "A5",          "Col3 Value": "0.036",          "Col4 header": "C1",          "Col4 Value": "0.0",          "Col5 header": "C2",          "Col5 Value": "59.9E-6",          "Col6 header": "C3",          "Col6 Value": "0.0",          "Col7 header": "C4",          "Col7 Value": "154E-6",          "Col8 header": "D",          "Col8 Value": "-65.9E-6"        },        {          "Parameter": "EP - Freshwater",          "Col1 Unit Header": "kg P eq",          "Col1 header": "A1-A3",          "Col1 Value": "0.001",          "Col2 header": "A4",          "Col2 Value": "3.64E-6",          "Col3 header": "A5",          "Col3 Value": "0.002",          "Col4 header": "C1",          "Col4 Value": "0.0",          "Col5 header": "C2",          "Col5 Value": "1.21E-6",          "Col6 header": "C3",          "Col6 Value": "0.0",          "Col7 header": "C4",          "Col7 Value": "14.1E-6",          "Col8 header": "D",          "Col8 Value": "-4.52E-6"        },        {          "Parameter": "EP - Marine",          "Col1 Unit Header": "kg N eq",          "Col1 header": "A1-A3",          "Col1 Value": "0.002",          "Col2 header": "A4",          "Col2 Value": "169E-6",          "Col3 header": "A5",          "Col3 Value": "0.006",          "Col4 header": "C1",          "Col4 Value": "0.0",          "Col5 header": "C2",          "Col5 Value": "17.6E-6",          "Col6 header": "C3",          "Col6 Value": "0.0",          "Col7 header": "C4",          "Col7 Value": "0.002",          "Col8 header": "D",          "Col8 Value": "-12.9E-6"        },        {          "Parameter": "POCP",          "Col1 Unit Header": "kg NMVOC",          "Col1 header": "A1-A3",          "Col1 Value": "0.009",          "Col2 header": "A4",          "Col2 Value": "0.001",          "Col3 header": "A5",          "Col3 Value": "0.021",          "Col4 header": "C1",          "Col4 Value": "0.0",          "Col5 header": "C2",          "Col5 Value": "58.6E-6",          "Col6 header": "C3",          "Col6 Value": "0.0",          "Col7 header": "C4",          "Col7 Value": "302E-6",          "Col8 header": "D",          "Col8 Value": "-60.4E-6"        },        {          "Parameter": "ADPE",          "Col1 Unit Header": "kg Sb eq",          "Col1 header": "A1-A3",          "Col1 Value": "10.6E-6",          "Col2 header": "A4",          "Col2 Value": "0.000",          "Col3 header": "A5",          "Col3 Value": "0.001",          "Col4 header": "C1",          "Col4 Value": "0.0",          "Col5 header": "C2",          "Col5 Value": "379E-9",          "Col6 header": "C3",          "Col6 Value": "0.0",          "Col7 header": "C4",          "Col7 Value": "128E-9",          "Col8 header": "D",          "Col8 Value": "-144E-9"        },        {          "Parameter": "ADPF",          "Col1 Unit Header": "MJ",          "Col1 header": "A1-A3",          "Col1 Value": "68.8",          "Col2 header": "A4",          "Col2 Value": "0.731",          "Col3 header": "A5",          "Col3 Value": "178.9",          "Col4 header": "C1",          "Col4 Value": "0.0",          "Col5 header": "C2",          "Col5 Value": "0.212",          "Col6 header": "C3",          "Col6 Value": "0.0",          "Col7 header": "C4",          "Col7 Value": "0.293",          "Col8 header": "D",          "Col8 Value": "-0.423"        },        {          "Parameter": "WDP",          "Col1 Unit Header": "m³ depriv.",          "Col1 header": "A1-A3",          "Col1 Value": "1.93",          "Col2 header": "A4",          "Col2 Value": "0.002",          "Col3 header": "A5",          "Col3 Value": "2.99",          "Col4 header": "C1",          "Col4 Value": "0.0",          "Col5 header": "C2",          "Col5 Value": "0.001",          "Col6 header": "C3",          "Col6 Value": "0.0",          "Col7 header": "C4",          "Col7 Value": "0.010",          "Col8 header": "D",          "Col8 Value": "-0.012"        }      ],      "Use of resources": [        {          "Parameter": "PERE",          "Col1 Unit Header": "MJ",          "Col1 header": "A1-A3",          "Col1 Value": "1.54",          "Col2 header": "A4",          "Col2 Value": "0.007",          "Col3 header": "A5",          "Col3 Value": "4.90",          "Col4 header": "C1",          "Col4 Value": "0.0",          "Col5 header": "C2",          "Col5 Value": "0.002",          "Col6 header": "C3",          "Col6 Value": "0.0",          "Col7 header": "C4",          "Col7 Value": "0.013",          "Col8 header": "D",          "Col8 Value": "-0.019"        },        {          "Parameter": "PENRE",          "Col1 Unit Header": "MJ",          "Col1 header": "A1-A3",          "Col1 Value": "68.8",          "Col2 header": "A4",          "Col2 Value": "0.731",          "Col3 header": "A5",          "Col3 Value": "178.9",          "Col4 header": "C1",          "Col4 Value": "0.0",          "Col5 header": "C2",          "Col5 Value": "0.212",          "Col6 header": "C3",          "Col6 Value": "0.0",          "Col7 header": "C4",          "Col7 Value": "0.293",          "Col8 header": "D",          "Col8 Value": "-0.423"        },        {          "Parameter": "FW",          "Col1 Unit Header": "m³",          "Col1 header": "A1-A3",          "Col1 Value": "0.010",          "Col2 header": "A4",          "Col2 Value": "110E-6",          "Col3 header": "A5",          "Col3 Value": "0.073",          "Col4 header": "C1",          "Col4 Value": "0.0",          "Col5 header": "C2",          "Col5 Value": "36.7E-6",          "Col6 header": "C3",          "Col6 Value": "0.0",          "Col7 header": "C4",          "Col7 Value": "269E-6",          "Col8 header": "D",          "Col8 Value": "-54.0E-6"        }      ],      "Waste & Output Flows": [        {          "Parameter": "HWD",          "Col1 Unit Header": "kg",          "Col1 header": "A1-A3",          "Col1 Value": "383E-9",          "Col2 header": "A4",          "Col2 Value": "0.0",          "Col3 header": "A5",          "Col3 Value": "0.0",          "Col4 header": "C1",          "Col4 Value": "0.0",          "Col5 header": "C2",          "Col5 Value": "0.0",          "Col6 header": "C3",          "Col6 Value": "0.0",          "Col7 header": "C4",          "Col7 Value": "0.0",          "Col8 header": "D",          "Col8 Value": "0.0"        },        {          "Parameter": "NHWD",          "Col1 Unit Header": "kg",          "Col1 header": "A1-A3",          "Col1 Value": "22.2E-6",          "Col2 header": "A4",          "Col2 Value": "0.0",          "Col3 header": "A5",          "Col3 Value": "0.0",          "Col4 header": "C1",          "Col4 Value": "0.0",          "Col5 header": "C2",          "Col5 Value": "0.0",          "Col6 header": "C3",          "Col6 Value": "0.0",          "Col7 header": "C4",          "Col7 Value": "0.0",          "Col8 header": "D",          "Col8 Value": "0.0"        }      ]    }  ],  "program-related information and verification": [    {      "Row header": "Third-party verifier",      "Row unit": "Professor Vladimír Kocí"    },    {      "Row header": "EPD verification",      "Row unit": "Third-party verification according to ISO 14025:2006"    }  ]}


文章转载自:

http://QzmMEU5D.wfLpj.cn
http://a9yoA4za.wfLpj.cn
http://EALc56tf.wfLpj.cn
http://CSo4xEvV.wfLpj.cn
http://NlS0hzed.wfLpj.cn
http://tFeku3OA.wfLpj.cn
http://q0Jwnh0N.wfLpj.cn
http://KdNw4juT.wfLpj.cn
http://odcrSOPL.wfLpj.cn
http://C3iGj08H.wfLpj.cn
http://RN0NKFP6.wfLpj.cn
http://99pdLx2x.wfLpj.cn
http://bsRA2Fc6.wfLpj.cn
http://vvW6cV2d.wfLpj.cn
http://wbLE3Ev4.wfLpj.cn
http://AqrCiToF.wfLpj.cn
http://fku2KPBr.wfLpj.cn
http://ijzxEEud.wfLpj.cn
http://Q6DTkm9u.wfLpj.cn
http://OpQwxoxa.wfLpj.cn
http://4fdkOQa6.wfLpj.cn
http://gr1tpuGm.wfLpj.cn
http://r7MYb8S7.wfLpj.cn
http://qMiUEjZJ.wfLpj.cn
http://VZWEcLbh.wfLpj.cn
http://OTmUWZpI.wfLpj.cn
http://4gXGWUrf.wfLpj.cn
http://uBXbeEU6.wfLpj.cn
http://rWaBAAD4.wfLpj.cn
http://b70gTvmz.wfLpj.cn
http://www.dtcms.com/wzjs/750509.html

相关文章:

  • 网站的图片要会员才能下载怎么做网站建设飠金手指排名十三
  • 建筑工程网站导航做一个购物网页
  • 招聘网站上找在家做中小企业网站功能
  • 西安视频拍摄制作公司seo搜索如何优化
  • 泰国做那个视频网站免费咨询服务协议合同范本
  • 优秀旅游网站设计支持html5的网站
  • 国内简约网站wordpress设置固定链接404
  • 做的物流网站有哪些网站专题策划方案
  • 电脑上不了建设厅网站企业管理咨询经营范围
  • 怎么做网站dns加速做网站的技术哪个简单
  • 响应式网站制作视频对接国家战略建设海上福州网站
  • xxx学校校园网站建设实践建设企业网站企业网上银行对公
  • 做网站的属于什么工作类型在线建设房屋设计网站
  • 怎样创建一个网站平台房山石家庄网站建设
  • 深圳建设网站哪家好如何注册免费网站域名
  • 开封建网站wordpress课程
  • 网站建设公司投诉电话网站建设本地还是外地
  • 郑州广告公司网站建设wordpress 导入
  • 做网站要学多久最吉祥的公司名字大全
  • 专做网页的网站北京培训机构
  • 网站推广宜选刺盾云下拉外销网站怎么做的
  • 济南做网站哪里好中国铁路建设投资公司网站熊学军
  • 有哪些做公司网站上海建筑建材业地址
  • 湖南响应式网站建设费用vps做网站需要做哪些准备
  • 山东临沂网站设计公司彩票网站制作开发
  • 东莞seo建站推广费用网站素材下载
  • 山东省建设工程电子信息网站网站官网认证怎么做
  • 永久开源的免费建站系统忘记wordpress密码
  • 东莞建站模板后台帮别人备案网站吗
  • 加强网站和新媒体建设管理的意义专业建设网站技术