php流式调用claude api实现多轮对话示例代码
代码语言:php
所属分类:其他
代码描述:php流式调用claude api实现多轮对话示例代码
代码标签: php 流式 调用 claude api 多轮 对话 示例 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<?php //申请key地址:https://console.anthropic.com/account/keys $ch = curl_init('https://api.anthropic.com/v1/messages'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', '.........完整代码请登录后点击上方下载按钮下载查看
网友评论0