拆解 MCP 的运行原理
注意:此实验非常消耗模型 Token
背景:最近 MCP 火的发烫,什么是 MCP 就不讨论了,比较好奇 MCP 具体的运行逻辑。
现象:同时使用 Cursor 和 MaxKB 对接腾讯地图的 MCP Server,发现返回的内容有较大差别。(和模型能力有较大关系)
Cursor 的返回结果,使用的是 Claude- 3.5:

MaxKB 的返回结果,此时使用的是阿里百炼的 qwen-turbo 模型:

实验目的:从大模型的角度拆解 MCP 的运行原理是什么,使用 CloudFlare 代理 AI 模型,看一下具体的调用链路,做过程记录。
具体原理:

注:MCP Client 在 Call 大模型的时候会提交大量包含工具使用等内容的提示词
实验步骤:
用到的工具:CloudFlare、OpenRouter、MaxKB、腾讯地图 MCP Server、Cursor
1、构建 Cloudflare AI Gateway
通过 CloudFlare 代理大模型,从而记录 API 调用

2、创建一个 OpenRouter 的 Platform
代理 OpenRouter

保管此 API Endpoint
3、注册 OpenRouter 并获取 Key
目的是免费使用合适的大模型

4、在 MaxKB 中添加 CloudFlare 代理的 AI 模型
用对接 OpenAI 的方式对接 通过 CloudFlare 代理的运行在 OpenRouter 上的 Claude。(这里有点绕,,,)
基础模型:在 OpenRouter 模型列表中的模型名称,此处选用 Cloude-3.5-sonnet
API URL:CloudFlare AI Gateway 的 API Endpoint
API Key:OpenRouter 上获取的 Key

5、注册腾讯地图服务并获取 Key
为什么选用腾讯地图的 MCP 服务?因为腾讯地图官方提供托管面部署的 MCP Server。
登录腾讯地图开发者平台,地址:https://lbs.qq.com/dev/console/home

创建应用并获取 Key

开启 API 配额,要不 API 无法调用

6、在MaxKB中添加腾讯地图 MCP Server
MCP Server 配置参考样例:
{
"tengxunditu": {
"url": "https://mcp.map.qq.com/sse?key=xxxx-xxxx-xxxx-xxxx-xxxx-xxxx",
"transport": "sse"
}
}
详情参考官方手册:https://lbs.qq.com/service/MCPServer/MCPServerGuide/userGuide
7、在 MaxKB 的工作流中使用使用 MCP 方式调用

注:此时使用的是 Claude-3.5-sonnet ,效果和在 Cursor 上使用比较接近
8、查看 CloudFlare AI Gateway 的记录
如图是一个 MCP 任务的 API 调用及消耗,单次 MCP 执行约消耗 10W Tokens

log 太多,这里放一部分。
请求:
{
"messages": [
{
"content": "问题:\n帮我规划从深圳会展中心去深圳宝安机场的驾车路线,中途去深圳车公庙地铁站附近加个油",
"role": "user"
}
],
"model": "anthropic/claude-3.5-sonnet",
"max_completion_tokens": 800,
"stream": true,
"temperature": 0.7,
"tools": [
{
"type": "function",
"function": {
"name": "geocoder",
"description": "提供由文字地址(包含省市区信息的完整地址)到经纬度的转换能力,并同时提供结构化的省市区地址信息",
"parameters": {
"type": "object",
"properties": {
"address": {
"description": "包含省市区信息的的格式化地址 或 包含城市名的地点关键词",
"type": "string"
}
},
"required": [
"address"
]
}
}
},
{
"type": "function",
"function": {
"name": "placeSuggestion",
"description": "根据要搜索地点的关键词和搜索的城市(城市名),搜索符合条件的地点信息, 返回包括地点名称、地址、经纬度、分类等(如搜索北京的景点、酒店、购物场景,搜索某个地方的详细地址等)",
"parameters": {
"type": "object",
"properties": {
"keyword": {
"description": "关键词,地点名称",
"type": "string"
},
"region": {
"description": "搜索城市,如果不知道城市名,可不输入本参数",
"type": "string"
}
},
"required": [
"keyword"
]
}
}
},
{
"type": "function",
"function": {
"name": "placeSearchNearby",
"description": "附近周边搜索,输入的搜索关键词,中心点经纬度(格式lat,lng)搜索其周边符合条件的地点信息 返回包括地点名称、地址、经纬度、分类等(如搜索北京的景点、酒店、购物场景,搜索某个地方的详细地址等)",
"parameters": {
"type": "object",
"properties": {
"keyword": {
"description": "关键词,地点名称",
"type": "string"
},
"location": {
"description": "搜索中心点经纬度(可以通过地址解析将文字地址转为经纬度),格式lat,lng",
"type": "string"
}
},
"required": [
"location",
"keyword"
]
}
}
},
{
"type": "function",
"function": {
"name": "directionDriving",
"description": "根据起终点经纬度,规划驾车路线,支持参考路况、少收费、不走高速等偏好,同时支持返回路线预估用时,路线距离,过路费等信息",
"parameters": {
"type": "object",
"properties": {
"from": {
"description": "起点经纬度,结构是lat,lng。 如果输入的是包含省市区信息的完整地址,可以调用地址解析获取经纬度, 如果是地点名称,可调用地点搜索获取经纬度(返回多条结果时可取第1条)",
"type": "string"
},
"to": {
"description": "终点(目的地)经纬度,结构是lat,lng。 如果输入的是包含省市区信息的完整地址,可以调用地址解析获取经纬度, 如果是地点名称,可调用地点搜索获取经纬度(返回多条结果时可取第1条)",
"type": "string"
}
},
"required": [
"from",
"to"
]
}
}
},
{
"type": "function",
"function": {
"name": "placeAlongby",
"description": "在路线的沿途进行搜索:输入路线的经纬度坐标串和搜索关键词,搜索该路线沿途符合该关键词的地点,路线的经纬度点串,可以通过驾车路线规划获取",
"parameters": {
"type": "object",
"properties": {
"keyword": {
"description": "搜索关键词,例如:充电站、厕所、停车场、购物、加油站、银行ATM、加气站、便利店、服务区、汽车维修、中石油、中石化",
"type": "string"
},
"polyline": {
"description": "经纬度点构成的折线,结构是lat1,lng1,lat2,lng2,lat3,lng4....",
"type": "string"
}
},
"required": [
"polyline",
"keyword"
]
}
}
},
{
"type": "function",
"function": {
"name": "placeDetail",
"description": "POI详情信息,根据POI ID搜索相关信息,包括:名称、地址、经纬度、分类、省市区信息。如果查询结果为空,则返回POI ID不存在",
"parameters": {
"type": "object",
"properties": {
"id": {
"description": "poiid",
"type": "string"
}
},
"required": [
"id"
]
}
}
},
{
"type": "function",
"function": {
"name": "matrix",
"description": "用于批量计算多个起终点到多个终点的路面距离(或称导航距离)",
"parameters": {
"type": "object",
"properties": {
"from": {
"description": "起点经纬度信息,结构是lat,lng。 如果输入的是包含省市区信息的完整地址,可以调用地址解析获取经纬度, 如果是地点名称,可调用地点搜索获取经纬度(返回多条结果时可取第1条)",
"type": "string"
},
"mode": {
"description": "通行方式,驾车为driving, 步行为walking, 骑行为bicycling。 不支持其他通行方式",
"type": "string"
},
"to": {
"description": "终点(目的地)经纬度信息,结构是lat,lng。 如果输入的是包含省市区信息的完整地址,可以调用地址解析获取经纬度, 如果是地点名称,可调用地点搜索获取经纬度(返回多条结果时可取第1条)",
"type": "string"
}
},
"required": [
"from",
"to",
"mode"
]
}
}
},
{
"type": "function",
"function": {
"name": "reverseGeocoder",
"description": "输入经纬度坐标,返回其所在位置的语义化地址、省、市、区、乡镇、门牌号、行政区划代码、商圈、地标、道路及交叉口、河流、湖泊、桥等",
"parameters": {
"type": "object",
"properties": {
"location": {
"description": "经纬度坐标,结构是lat,lng",
"type": "string"
}
},
"required": [
"location"
]
}
}
},
{
"type": "function",
"function": {
"name": "ipLocation",
"description": "通过终端设备IP地址获取其当前所在省、市、区信息。",
"parameters": {
"type": "object",
"properties": {
"ip": {
"description": "IP地址(IPv4或IPv6)",
"type": "string"
}
},
"required": [
"ip"
]
}
}
},
{
"type": "function",
"function": {
"name": "weather",
"description": "通过行政区划代码,查询对应城市的实时天气或预报天气。",
"parameters": {
"type": "object",
"properties": {
"adcode": {
"description": "行政区划代码(可通过调用地址解析获取,输入地址或城市名,返回结果中的adcode即为行政区划代码)",
"type": "string"
},
"type": {
"description": "可选now或者future。用户查询当前天气为now,查询未来天气为future。可为空,默认为now。",
"type": "string"
}
},
"required": [
"adcode"
]
}
}
},
{
"type": "function",
"function": {
"name": "directionWalking",
"description": "根据起终点经纬度,规划步行路线,返回包括路线总距离、预估用时等",
"parameters": {
"type": "object",
"properties": {
"from": {
"description": "起点经纬度信息,结构是lat,lng。 如果输入的是包含省市区信息的完整地址,可以调用地址解析获取经纬度, 如果是地点名称,可调用地点搜索获取经纬度(返回多条结果时可取第1条)",
"type": "string"
},
"to": {
"description": "终点(目的地)点经纬度信息,结构是lat,lng。 如果输入的是包含省市区信息的完整地址,可以调用地址解析获取经纬度, 如果是地点名称,可调用地点搜索获取经纬度(返回多条结果时可取第1条)",
"type": "string"
}
},
"required": [
"from",
"to"
]
}
}
},
{
"type": "function",
"function": {
"name": "directionBicycling",
"description": "根据起终点经纬度,规划自行车骑行路线,返回包括路线总距离、预估用时等",
"parameters": {
"type": "object",
"properties": {
"from": {
"description": "起点经纬度信息,结构是lat,lng。 如果输入的是包含省市区信息的完整地址,可以调用地址解析获取经纬度, 如果是地点名称,可调用地点搜索获取经纬度(返回多条结果时可取第1条)",
"type": "string"
},
"to": {
"description": "终点(目的地)点经纬度信息,结构是lat,lng。 如果输入的是包含省市区信息的完整地址,可以调用地址解析获取经纬度, 如果是地点名称,可调用地点搜索获取经纬度(返回多条结果时可取第1条)",
"type": "string"
}
},
"required": [
"from",
"to"
]
}
}
},
{
"type": "function",
"function": {
"name": "directionTransit",
"description": "公共交通路线规划,根据起终点经纬度,规划公交/地铁线路乘坐方案, 支持指定出发时间(确保线路在首末车时段内),支持时间短、少换乘、少步行、地铁优先等多种偏好,为您规划多组乘坐方案, 同时返回路线总预估用时、总距离、总步行距离、票价,具体线路如何换乘(线路名、上车站、下车站名等)、首末车时间等",
"parameters": {
"type": "object",
"properties": {
"from": {
"description": "起点经纬度信息,结构是lat,lng。 如果输入的是包含省市区信息的完整地址,可以调用地址解析获取经纬度, 如果是地点名称,可调用地点搜索获取经纬度(返回多条结果时可取第1条)",
"type": "string"
},
"to": {
"description": "终点(目的地)点经纬度信息,结构是lat,lng。 如果输入的是包含省市区信息的完整地址,可以调用地址解析获取经纬度, 如果是地点名称,可调用地点搜索获取经纬度(返回多条结果时可取第1条)",
"type": "string"
}
},
"required": [
"from",
"to"
]
}
}
},
{
"type": "function",
"function": {
"name": "futureDrivingDirection",
"description": "根据起终点经纬度、未来出发时间,规划驾车驾车路线,路线会考虑未来时间的预测路况进行规划,支持返回预估用时、总距离等信息",
"parameters": {
"type": "object",
"properties": {
"departure_time": {
"description": "出发时间(时间戳格式)",
"type": "string"
},
"from": {
"description": "起点经纬度信息,结构是lat,lng。 如果输入的是包含省市区信息的完整地址,可以调用地址解析获取经纬度, 如果是地点名称,可调用地点搜索获取经纬度(返回多条结果时可取第1条)",
"type": "string"
},
"to": {
"description": "终点(目的地)点经纬度信息,结构是lat,lng。 如果输入的是包含省市区信息的完整地址,可以调用地址解析获取经纬度, 如果是地点名称,可调用地点搜索获取经纬度(返回多条结果时可取第1条)",
"type": "string"
}
},
"required": [
"from",
"to",
"departure_time"
]
}
}
},
{
"type": "function",
"function": {
"name": "waypointOrder",
"description": "基于驾车路线规划,对输入的途经点以最顺路方式排序并规划路线,排序途经点最多16个。返回结果中的waypoints代表途经点的顺序",
"parameters": {
"type": "object",
"properties": {
"from": {
"description": "起点经纬度信息,结构是lat,lng。 如果输入的是包含省市区信息的完整地址,可以调用地址解析获取经纬度, 如果是地点名称,可调用地点搜索获取经纬度(返回多条结果时可取第1条)",
"type": "string"
},
"need_waypoint_order": {
"description": "如果waypoints不是空,则传true",
"type": "string"
},
"to": {
"description": "终点(目的地)点经纬度信息,结构是lat,lng。 如果输入的是包含省市区信息的完整地址,可以调用地址解析获取经纬度, 如果是地点名称,可调用地点搜索获取经纬度(返回多条结果时可取第1条)",
"type": "string"
},
"waypoints": {
"description": "途经点经纬度,支持最多16个,结构是lat1,lng1;lat2,lng2;lat3,lng3....如果输入的是地址,则需要调用geocoder获取经纬度信息",
"type": "string"
}
},
"required": [
"from",
"to"
]
}
}
}
]
}
----------------------------------------------------------------------------------------------------------------------------------------------------
返回:
{
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"choices": [
{
"delta": {
"role": "assistant",
"content": "我来帮您规划这段行程。这需要分几步:\n1. 先获取各个地点的具体位置和经纬度\n2. 规划加油站的最佳途经顺序\n3. 查看行驶路线\n\n让我们一步步来:\n\n1. 首先获取这些地点的经纬度:"
}
}
],
"usage": {
"prompt_tokens": 11944,
"completion_tokens": 141,
"total_tokens": 12085
},
"streamed_data": [
{
"nonce": "a3",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": ""
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "9cf808bed3270cb4",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "我"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "c3",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "来"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "1a5a3a1e8349",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "帮您"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "949c",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "规划这"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "11c0",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "段"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "7049e8514f81",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "行"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "cf6f8026cc652491",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "程。这"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "6b479e3a",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "需"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "519a5460e5bba1a0",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "要分"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "05d1",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "几"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "3ee4",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "步:"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "f83b",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "\n1. 先"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "e6b55adf",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "获"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "3c284b",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "取各"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "5d39ab42",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "个"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "bdb5",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "地"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "260762bf77b7",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "点的具"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "2e",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "体位置和"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "c43992a3f65bb6d1",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "经"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "19afbefb65",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "纬度"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "0400bd6349573f1c",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "\n2. 规"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "75c3db90fa",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "划加"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "6e371898d0e502",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "油站的最"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "b95ae22b01",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "佳途"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "1978d5d7",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "经"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "c540e9faad8cf5",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "顺序"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "dd2671b8c9",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "\n3. 查"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "fb5fdb",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "看行"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "b73a29511e7c",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "驶路线"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "09fe",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "\n\n让"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "6e",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "我们一"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "2e3ef81cd56e71d6",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "步步"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "69791b866a94b420",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "来:"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "db",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "\n\n1. "
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "1d445b",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "首"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "0cf97e2eec",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "先获取这"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "3cc30c",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "些地点的"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "6319ca0a9d8ec971",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "经"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "f23555",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "纬度:"
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "55460da8",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": ""
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "51",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"delta": {
"role": "assistant",
"content": null,
"tool_calls": [
{
"id": "tooluse_NiqffqaITCmVtmoeIMkFNg",
"index": 0,
"type": "function",
"function": {
"name": "geocoder",
"arguments": ""
}
}
]
},
"index": 0,
"finish_reason": null,
"native_finish_reason": null
}
]
},
{
"nonce": "1f",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"delta": {
"role": "assistant",
"content": null,
"tool_calls": [
{
"index": 0,
"type": "function",
"function": {
"arguments": ""
}
}
]
},
"index": 0,
"finish_reason": null,
"native_finish_reason": null
}
]
},
{
"nonce": "d180bed3",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"delta": {
"role": "assistant",
"content": null,
"tool_calls": [
{
"index": 0,
"type": "function",
"function": {
"arguments": "{\""
}
}
]
},
"index": 0,
"finish_reason": null,
"native_finish_reason": null
}
]
},
{
"nonce": "1def6ce090",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"delta": {
"role": "assistant",
"content": null,
"tool_calls": [
{
"index": 0,
"type": "function",
"function": {
"arguments": "ad"
}
}
]
},
"index": 0,
"finish_reason": null,
"native_finish_reason": null
}
]
},
{
"nonce": "75",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"delta": {
"role": "assistant",
"content": null,
"tool_calls": [
{
"index": 0,
"type": "function",
"function": {
"arguments": "dress\""
}
}
]
},
"index": 0,
"finish_reason": null,
"native_finish_reason": null
}
]
},
{
"nonce": "39b54669",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"delta": {
"role": "assistant",
"content": null,
"tool_calls": [
{
"index": 0,
"type": "function",
"function": {
"arguments": ": \"深圳会展中心\"}"
}
}
]
},
"index": 0,
"finish_reason": null,
"native_finish_reason": null
}
]
},
{
"nonce": "4509",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": ""
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "edb0917e",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": ""
},
"finish_reason": "tool_calls",
"native_finish_reason": "tool_calls",
"logprobs": null
}
]
},
{
"nonce": "f8bb8536b4dc32",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": ""
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
]
},
{
"nonce": "7450c6b8a93ceb",
"id": "gen-1744110839-tKMReVlveRBEHdEelZCW",
"provider": "Amazon Bedrock",
"model": "anthropic/claude-3.5-sonnet",
"object": "chat.completion.chunk",
"created": 1744110839,
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": ""
},
"finish_reason": null,
"native_finish_reason": null,
"logprobs": null
}
],
"usage": {
"prompt_tokens": 11944,
"completion_tokens": 141,
"total_tokens": 12085
}
}
]
}
拆解 MCP 的运行原理的更多相关文章
- iis6.0与asp.net的运行原理
这几天上网翻阅了不少前辈们的关于iis和asp.net运行原理的博客,学的有点零零散散,花了好长时间做了一个小结(虽然文字不多,但也花了不少时间呢),鄙人不才,难免有理解不道的地方,还望前辈们不吝赐教 ...
- ASP.NET Core 运行原理剖析2:Startup 和 Middleware(中间件)
ASP.NET Core 运行原理剖析2:Startup 和 Middleware(中间件) Startup Class 1.Startup Constructor(构造函数) 2.Configure ...
- ASP.NET Core 运行原理剖析1:初始化WebApp模版并运行
ASP.NET Core 运行原理剖析1:初始化WebApp模版并运行 核心框架 ASP.NET Core APP 创建与运行 总结 之前两篇文章简析.NET Core 以及与 .NET Framew ...
- 场景9 深入RAC运行原理
场景9 深入RAC运行原理 OPS(Oracle Parallel Server)通过磁盘的节点判定数据是否最新 —> Data Guard —> RAC(Real Ap ...
- Camel运行原理分析
Camel运行原理分析 以一个简单的例子说明一下camel的运行原理,例子本身很简单,目的就是将一个目录下的文件搬运到另一个文件夹,处理器只是将文件(限于文本文件)的内容打印到控制台,首先代码如下: ...
- Web程序的运行原理及流程(一)
自己做Web程序的开发也有两年多了 从最开始跟风学框架 到第一用上框架的欣喜若狂 我相信每个程序员都是这样过来的 在大学学习一门语言 学会后往往很想做一个实际的项目出来 我当时第一次做WEB项目看 ...
- Asp.net WebPages框架运行原理浅析(转)
在Asp.net4和4.5中,新增了WebPages Framework,编写页面代码使用了新的Razor语法,代码更加的简洁和符合Web标准,编写方式更接近于PHP和以前的Asp,和使用 WebFo ...
- ASP.NT运行原理和页面生命周期详解及其应用
ASP.NT运行原理和页面生命周期详解及其应用 1. 下面是我画的一张关于asp.net运行原理和页面生命周期的一张详解图.如果你对具体不太了解,请参照博客园其他帖子.在这里我主要讲解它的实际应用. ...
- jsp学习--JSP运行原理,九大隐式对象和JSP常用标签
一.JSP运行原理 每个JSP 页面在第一次被访问时,WEB容器都会把请求交给JSP引擎(即一个Java程序)去处理.JSP引擎先将JSP翻译成一个_jspServlet(实质上也是一个servlet ...
- Linux X Window System运行原理和启动过程
本文主要说明X Window System的基本运行原理,其启动过程,及常见的跨网络运行X Window System. 一) 基本运行原理 X Window System采用C/S结构,但和我们常见 ...
随机推荐
- 分布式文件系统KFS基础知识介绍
Kosmos distributed file system,简称KFS,是一个类GFS的分布式文件系统,被设计用于分布式的结构化存储.下面将对KFS的体系结构进行简单介绍,最后给出一个使用KFS C ...
- Linux 虚拟机中不重启的情况下加新硬盘及扩展根分区容量
我这个系统是Redhat7.7的系统.磁盘占用比较高,需要扩充空用空间,同时又不能关停服务器,或者服务.所以就需要在虚拟机中不重启的情况下加新硬盘及扩展根分区容量. 首先,看一下我这个虚拟机分区占用情 ...
- 最大流问题:增广路与 Edmonds-Karp 算法
最大流问题是其中一个经典的图论问题,其目标是在一个流网络中计算从源点到汇点的最大流量.流网络由节点和边组成,每条边都有一个容量,表示该边所能承载的最大流量. 最大流问题 通常来说,最大流问题仅在有向图 ...
- Iterator迭代器接口(遍历Collection的两种方式之一)
使用 Iterator 接口遍历集合元素: Iterator对象称为迭代器(设计模式的一种),主要用于遍历 Collection 集合中的元素. GOF给迭代器模式的定义为:提供一种方法访问一个容 ...
- 对rpc长连接与短连接的思考
大家好,我是思无邪,某go中厂开发工程师,也是OSPP2024的学生参与者! 如果你觉得我的文章有帮助,记得三连支持一下哦! 目前正在深入研究源码,与你们一起进步,共同攻克编程难关! 欢迎关注我的公众 ...
- 使用天翼云云容器引擎CCE创建简单nginx服务
本文分享自天翼云开发者社区<使用天翼云云容器引擎CCE创建简单nginx服务>,作者:b****n 一.创建一个nginx应用. 1.选择资源池,如[杭州2],进入云容器引擎CCE平台页面 ...
- mac 安装vue
1.git clone https://github.com/vuejs/vue-devtools.git 切换master分支 cd vue-devtools npm install --regis ...
- Atcoder ABC388F Dangerous Sugoroku 题解 [ 蓝 ] [ 矩阵加速 ] [ 状压矩乘 ] [ 模拟 ]
Dangerous Sugoroku:赛时写了矩乘 T 飞了,受到 sunkuangzheng 大佬的启发才知道要状压矩乘. 暴力矩乘思路 直接像过河那样写模拟细节非常多,于是考虑像美食家一样的思路, ...
- .NET最佳实践:业务逻辑减少使用异常
在 .NET 开发中,异常处理是保证应用健壮性的重要手段,但不应被滥用. 异常的引发和捕获相较于普通的代码逻辑性能较差,因此在热路径(频繁执行的代码路径)中,避免依赖异常来控制程序流是提升性能的关键之 ...
- 5分钟搞定!用比扬云SD-WAN远程访问飞牛NAS全攻略
作为一个NAS重度用户,我最近遇到了一个头疼的问题:如何在外部安全地访问家里的飞牛NAS?经过一番摸索,我发现比扬云SD-WAN是个不错的解决方案,今天就来分享我的实战经验. 一.为什么选择比扬云SD ...