莆系医疗网站建设wordpress建站后怎样发布
2026/5/19 7:55:06 网站建设 项目流程
莆系医疗网站建设,wordpress建站后怎样发布,杭州游戏软件开发公司,哪里有做彩票网站了〇、前言从 2020 年到 2025 年#xff0c;AI 在多个维度实现了跨越式发展。从 ChatGPT 到 DeepSeek 等大型语言模型#xff08;LLM#xff09;#xff0c;以及多模态融合#xff0c;从一开始的文本到后续的图片、文档、视频#xff0c;还有辅助编程等等#xff0c;都在说…〇、前言从 2020 年到 2025 年AI 在多个维度实现了跨越式发展。从 ChatGPT 到 DeepSeek 等大型语言模型LLM以及多模态融合从一开始的文本到后续的图片、文档、视频还有辅助编程等等都在说明 AI 不是“未来趋势”而是正在重塑开发方式的“当下现实”。因此多接触一些 AI 方面的知识变的很有必要。那么本文将就 MCP 这一块先做下简单介绍 MCP 是什么然后通过简单的示例来看下怎么用。回到顶部一、MCP 简介1.1 什么是 MCPMCPModel Context Protocol模型上下文协议是由 Anthropic 于 2024 年 11 月推出的开源协议旨在为【大型语言模型Large Language ModelLLM】与【外部数据源、工具和服务】提供标准化、安全的双向通信接口。MCP 可以将 AI 模型与外部世界的连接简化为“即插即用”的接口类似 USB-C 的通用性避免为每个工具单独定制集成方案。它可以通过统一协议实现 AI 模型与数据库、API、文件系统等的无缝协作解决传统“碎片化集成”的痛点。image四大优势标准化StandardizationMCP 遵循统一的技术规范和接口定义确保不同系统、组件或服务之间的兼容性。标准化可以带来的好处降低集成成本通过定义清晰的数据格式如JSON Schema、Protobuf、API规范如OpenAPI和通信协议如REST、gRPCMCP使得异构系统能够快速对接。提升可维护性标准化的接口和日志格式便于监控、调试和团队协作。促进生态发展第三方开发者可基于标准快速开发插件或扩展形成丰富的工具链。类比技术类似HTTP/REST在Web服务中的角色或Kubernetes的CRD自定义资源定义标准。安全性SecurityMCP 内置多层次安全机制保障数据传输、存储和访问控制的安全。好处如下端到端加密支持TLS/SSL等加密传输防止数据泄露。身份认证与授权集成OAuth2、JWT、RBAC基于角色的访问控制等机制确保只有合法用户和系统可访问资源。审计与合规记录操作日志满足GDPR、等保等法规要求。防御常见攻击如防重放攻击、DDoS缓解、输入验证等。应用场景适用于金融、医疗等对数据隐私要求高的行业。灵活性FlexibilityMCP 支持多种部署模式、可扩展架构和动态配置适应不同业务需求。好处如下模块化设计功能组件可插拔用户可根据需要启用或替换模块。支持多语言/多框架提供 SDK 或 API 支持 Python、Java、Go 等多种语言便于现有系统集成。动态配置与热更新无需重启服务即可调整参数或升级功能。适应不同规模从小型应用到大规模分布式系统均可部署。类比架构类似于微服务网关如Istio或消息中间件如Kafka的灵活集成能力。跨平台Cross-PlatformMCP 可在不同操作系统、硬件架构和云环境中运行。操作系统兼容支持 Windows、Linux、macOS、嵌入式 RTOS 等。云原生支持可在 AWS、Azure、阿里云等公有云及私有云环境中部署支持容器化Docker和编排k8s。边缘计算兼容可在边缘设备如 IoT 网关与中心云之间无缝协同。统一管理界面无论底层平台如何提供一致的管理、监控和开发体验。技术基础通常基于跨平台运行时如 Java JVM、.NET Core或轻量级协议如 MQTT、CoAP。MCP 通过标准化接口和客户端-服务器架构解决了LLM与外部工具集成的难题。它不仅让 LLM 能够访问本地和远程资源还通过动态上下文管理和安全机制提升了AI应用的灵活性和可靠性。随着MCP 生态的扩展开发者可以更高效地构建智能应用推动AI技术的实际落地。1.2 核心架构Host-Client-ServerMCP 采用客户端-服务器架构Client-Server Architecture由以下三类组件构成MCP Host主机它是发起请求的 AI 应用程序例如聊天机器人、AI 驱动的 IDE如 Cursor、Claude Desktop 等。主要职责接收用户输入与 LLM 交互生成指令并在 LLM 需要调用外部工具时触发 MCP 流程。MCP Client客户端也可以叫做“协议转换层”作为 MCP Host 与 MCP Server 之间的桥梁。主要职责与 MCP Server 建立持久连接如通过 JSON-RPC 2.0 协议。将 LLM 的请求翻译为 MCP 标准格式并发送给 MCP Server。接收 MCP Server 的响应返回给 MCP Host。MCP Server服务器也可以叫做“功能提供层”封装具体的数据源或工具的访问逻辑。主要职责提供标准化的接口支持访问本地资源如文件系统、数据库或远程服务如 API、SaaS 平台。执行具体的工具调用如查询数据库、发送邮件并返回结果。关系图如下image1.3 MCP 是如何工作的MCP 的工作流程大概可以分为如下几个步骤。1建立连接MCP Client 与 MCP Server 建立通信连接通常通过以下方式本地通信STDIO适用于同一设备内的进程间通信如 AI 助手调用本地文件。远程通信HTTPSSE适用于跨网络访问远程服务如调用云 API。2资源发现MCP Client 向 MCP Server 查询可用的工具和数据源获取其功能描述和接口规范如 OpenAPI 文档。示例AI 助手需要查询天气时MCP Client 会找到支持天气查询的 MCP Server并获取其 API 参数。3工具调用MCP Host通过 LLM解析用户需求生成调用外部工具的指令。MCP Client 将指令转换为 MCP 标准格式JSON-RPC 2.0并发送给 MCP Server。示例用户要求“查询北京的天气”LLM 生成调用天气 API 的指令MCP Client 将其发送到天气 MCP Server。4数据交互MCP Server 执行具体的工具调用如访问数据库、调用 API获取或更新数据。安全机制MCP Server 通过权限控制和沙箱机制确保 LLM 只能访问授权的资源。5结果返回MCP Server 将处理结果返回给 MCP Client。MCP Client 将结果转换为 LLM 可理解的格式并传递给 MCP Host。MCP Host 将结果呈现给用户或用于后续处理。这过程中涉及到的通信协议主要有三种1JSON-RPC 2.0 轻量级、跨语言支持适合远程过程调用RPC{jsonrpc: 2.0,method: get_weather,params: {location: Beijing},id: 1}2SSEServer-Sent Events支持服务器向客户端的流式推送适合实时数据交互。应用场景长轮询天气更新、实时日志输出。3STDIO标准输入输出适用于本地进程间通信延迟低。应用场景AI助手读写本地文件或调用本地工具。回到顶部二、Windows 环境基于 Ollama 和 .net 的简单示例2.1 Ollama 的安装和大模型下载简介Ollama 是一个开源的本地大模型运行框架旨在让开发者能够在本地机器上轻松地运行、管理和使用大型语言模型LLM。它支持多种主流模型架构如 Llama、Qwen、Mistral、Gemma、Phi 等提供简洁的命令行接口CLI和 REST API便于集成到应用中。其核心特点本地运行所有模型都在你的设备上运行保护数据隐私。轻量高效优化了模型加载和推理性能支持 GPU 加速CUDA、Metal 等。简单易用通过简单的 ollama run 命令即可下载并运行模型。跨平台支持支持 macOS、Linux 和 Windows。可定制化支持自定义模型参数、创建 Modelfile 定制提示词、上下文长度等。下载和安装官网下载地址https://ollama.com/download。然后双击开始安装即可。// 查看是否安装成功// 命令行执行 -vC:\Windows\system32ollama -vollama version is 0.12.0// 使用 run 命令可以安装和运行指定模型// 首次运行时会自动从 Ollama 的模型库下载 qwen:7b 模型文件// 文件约 4-5 GB具体大小取决于量化版本需要稳定的网络连接C:\Windows\system32ollama run qwen:7b// 查看已安装模型C:\Windows\system32ollama listNAME ID SIZE MODIFIEDqwen:7b 2091ee8c8d8f 4.5 GB 3 days ago// 运行模型C:\Windows\system32ollama run qwen:7b 你是谁我是阿里云研发的大规模语言模型我叫通义千问。 Send a message (/? for help)可调用的 APIOllama 提供了一组简洁但功能完整的 RESTful API用于与本地运行的大模型进行交互。这些 API 默认运行在 http://localhost:11434 地址上支持外部程序调用实现模型推理、管理、生成等功能。以下是 Ollama 中可供外部调用的主要 API 接口及特点API 地址 方法 主要用途 是否流式 适用场景/api/generate POST 单轮文本生成 ✅ 支持 内容生成、简单问答/api/chat POST 多轮对话生成 ✅ 支持 聊天机器人、对话系统/api/embeddings POST 文本向量化 ❌ 不支持 RAG、语义搜索/api/tags GET 列出模型 ❌ 模型管理前端展示/api/create POST 创建自定义模型 ✅进度流 模型定制/api/delete POST 删除模型 ❌ 清理资源/api/show POST 查看模型详情 ❌ 调试、集成配置2.2 简单调用示例.net 8.0【完整代码】【使用旧版的大模型qwen:7b】首先安装包ModelContextProtocolServer.Sse。如下包简介image2.2.1 服务端代码注意博主在尝试通过属性McpServerTool来自动获取 tool 列表时没有成功因此直接从 Controller 中通过代码获取。// Program.csvar builder WebApplication.CreateBuilder(args);// Add services to the container.// 添加 MCP 服务器服务builder.Services.AddMcpServer().WithToolsFromAssembly(); // 自动注册当前程序集中的工具builder.Services.AddMcpServer().WithHttpTransport();builder.Services.AddControllers();builder.Services.AddEndpointsApiExplorer();var app builder.Build();app.UseHttpsRedirection();app.MapGet(/, () MCP Time Server is running!);app.MapMcp(); // 映射 MCP 端点app.UseAuthorization();app.MapControllers();app.Run();// TimeTool.csusing ModelContextProtocol.Server;using System.ComponentModel;namespace McpTimeServer.Tools;[McpServerToolType, Description(Time-related tools)]public static class TimeTool{[McpServerTool, Description(Get the current time for a city)]public static string GetCurrentTime([Description(The name of the city)] string city){// 简化逻辑直接返回当前时间仅供测试用var now DateTime.Now;return ${{result:The current time in {city} is {now:HH:mm} on {now:yyyy-MM-dd}.}};}}// McpController.csusing Microsoft.AspNetCore.Mvc;using ModelContextProtocol.Server;using System.ComponentModel;using System.Reflection;using System.Text.Json;namespace McpTimeServer;[ApiController][Route([controller])]public class McpController : ControllerBase{private readonly Dictionarystring, ToolInfo _registeredTools;public McpController(){_registeredTools DiscoverTools();}/// summary/// GET: /mcp/tools - 返回所有可用工具的元数据/// /summary[HttpGet(tools)]public IActionResult GetTools(){var tools _registeredTools.Values.Select(t new{name t.Name,description t.Description,inputSchema t.InputSchema});return Ok(tools);}/// summary/// POST: /mcp/invoke - 调用指定工具/// /summary[HttpPost(invoke)]public async TaskIActionResult InvokeTool([FromBody] JsonElement body){if (!body.TryGetProperty(name, out var nameElement) || nameElement.ValueKind ! JsonValueKind.String)return BadRequest(new { error Invalid or missing name in request. });var toolName nameElement.GetString()!;if (!_registeredTools.TryGetValue(toolName, out var tool))return NotFound(new { error $Tool {toolName} not found. });JsonElement js new JsonElement();// 提取 argumentsvar arguments body.TryGetProperty(arguments, out var args) ? args : js;try{JsonElement actualArguments;if (arguments.ValueKind JsonValueKind.String){// 如果是字符串尝试解析它为 JSONstring jsonString arguments.GetString();using JsonDocument innerDoc JsonDocument.Parse(jsonString);actualArguments innerDoc.RootElement.Clone(); // Clone 以脱离 document 生命周期}else{actualArguments arguments;}// 绑定参数并调用var methodArgs BindArguments(tool.Method, actualArguments);var result tool.Method.Invoke(null, methodArgs); // 静态方法实例为 nullreturn Ok(result ?? null);}catch (TargetInvocationException ex){return StatusCode(500, new { error Tool execution failed., message ex.InnerException?.Message });}catch (Exception ex){return StatusCode(500, new { error Tool binding failed., message ex.Message });}}/// summary/// 工具列表/// /summary/// returns/returnsprivate Dictionarystring, ToolInfo DiscoverTools(){var tools new Dictionarystring, ToolInfo();var assemblies AppDomain.CurrentDomain.GetAssemblies();foreach (var assembly in assemblies){try{var types assembly.GetTypes().Where(t t.IsDefined(typeof(McpServerToolTypeAttribute), false) t.IsAbstract t.IsSealed); // 静态类foreach (var type in types){var methods type.GetMethods(BindingFlags.Public | BindingFlags.Static).Where(m m.IsDefined(typeof(McpServerToolAttribute), false));foreach (var method in methods){var attr method.GetCustomAttributeMcpServerToolAttribute()!;var description method.GetCustomAttributeDescriptionAttribute()?.Description ?? No description.;var name attr.Name ?? method.Name;var inputSchema GenerateInputSchema(method);tools[name] new ToolInfo{Name name,Method method,Description description,InputSchema inputSchema};}}}catch(Exception ex){ }}return tools;}private object[] BindArguments(MethodInfo method, JsonElement arguments){var parameters method.GetParameters();var args new object?[parameters.Length];for (int i 0; i parameters.Length; i){try{var param parameters[i];string paramName param.Namenull?: param.Name.ToLower().ToString();if (arguments.TryGetProperty(paramName, out var valueElement)){args[i] valueElement.ValueKind switch{JsonValueKind.String valueElement.GetString(),JsonValueKind.Number when param.ParameterType typeof(int) valueElement.GetInt32(),JsonValueKind.Number when param.ParameterType typeof(double) valueElement.GetDouble(),JsonValueKind.True or JsonValueKind.False valueElement.GetBoolean(),_ valueElement.GetRawText() // fallback};}else if (param.HasDefaultValue){args[i] param.DefaultValue;}else{throw new ArgumentException($Missing required parameter: {param.Name});}}catch(Exception ex){ }}return args;}private object GenerateInputSchema(MethodInfo method){var properties new Dictionarystring, object();var required new Liststring();foreach (var param in method.GetParameters()){var paramName param.Name!.ToLower();var description param.GetCustomAttributeDescriptionAttribute()?.Description ?? ;properties[paramName] new{type string, // 简化所有参数视为 stringdescription};if (!param.HasDefaultValue)required.Add(paramName);}return new{type object,properties,required required.Count 0 ? required : (object)Array.Emptystring()};}}// 工具元数据internal class ToolInfo{public required string Name { get; init; }public required MethodInfo Method { get; init; }public required string Description { get; init; }public required object InputSchema { get; init; }}// 请求体public class InvokeToolRequest{public string? Name { get; set; }public JsonElement Arguments { get; set; }}2.2.2 客户端代码// Program.csusing McpClientApp.Models;using Newtonsoft.Json;using System;using System.Net.Http;using System.Net.Http.Json;using System.Text;using System.Text.Json;using System.Text.Json.Serialization;using System.Threading.Tasks;// .NET 8 顶级语句无需 class/Program/mainConsole.WriteLine(MCP Client with Qwen (via Ollama) - .NET 8 - Type exit to quit);// 创建 HttpClient (生产环境建议使用 IHttpClientFactory)using var httpClient new HttpClient();while (true){Console.Write(\nYou: );var userQuestion Console.ReadLine();if (string.IsNullOrWhiteSpace(userQuestion) || userQuestion.ToLower() exit)break;await ProcessQuestionAsync(userQuestion, httpClient);}async Task ProcessQuestionAsync(string userQuestion, HttpClient client){const string ollamaUrl http://localhost:11434/api/chat;const string mcpServerUrl http://localhost:5113;// 1. 动态获取工具列表并生成提示词var systemPrompt await GetAvailableToolsAsync(client, mcpServerUrl);// 2. 调用 Ollama (Qwen)object[] messages [new { role system, content systemPrompt },new { role user, content userQuestion }];var ollamaResponse await CallOllamaAsync(qwen:7b, messages, client, ollamaUrl);if (string.IsNullOrEmpty(ollamaResponse)){Console.WriteLine(Error: No response from Ollama.);return;}Console.WriteLine($LLM Export: {ollamaResponse});// 3. 尝试解析为工具调用try{ollamaResponse ollamaResponse.Replace(}}}, }});using var jsonDoc JsonDocument.Parse(ollamaResponse);var root jsonDoc.RootElement;if (root.TryGetProperty(tool, out var toolElement) root.TryGetProperty(arguments, out var argsElement)){var toolName toolElement.GetString();var argumentsJson argsElement.GetRawText(); // 保持原始 JSON 字符串Console.WriteLine($Calling MCP tool: {toolName} with {argumentsJson});// 4. 调用 MCP 服务端var toolResult await InvokeMcpToolAsync(toolName, argumentsJson, client, mcpServerUrl);// 5. 让 LLM 生成最终回复object[] finalMessages [new { role system, content You are a helpful assistant. },new { role user, content userQuestion },new { role assistant, content ollamaResponse },new { role tool, content toolResult } // MCP 工具结果];var finalResponse await CallOllamaAsync(qwen:7b, finalMessages, client, ollamaUrl);Console.WriteLine($Final AnswerMCP: {finalResponse});return;}}catch (Exception ex){// 不是有效的 JSON说明是直接回答}// 直接回答Console.WriteLine($AnswerNo MCP: {ollamaResponse});}// 【调用 Ollama API】async Taskstring CallOllamaAsync(string model, object[] messages, HttpClient client, string ollamaUrl){var payload new{model,messages,stream false};var response await client.PostAsJsonAsync(ollamaUrl, payload);response.EnsureSuccessStatusCode();var jsonResponse await response.Content.ReadFromJsonAsyncJsonElement();// ValueKind Object : {model:qwen:7b,created_at:2025-09-24T11:53:43.645783Z,message:{role:assistant,content:{\tool\: \GetCurrentTime\, \arguments\: {\city\: \London\}}}},done:true,done_reason:stop,total_duration:2392332700,load_duration:47250000,prompt_eval_count:112,prompt_eval_duration:176531800,eval_count:18,eval_duration:2167583600}return jsonResponse.GetProperty(message).GetProperty(content).ToString().Replace(\n,);}// 【调用 MCP 服务端工具】async Taskstring InvokeMcpToolAsync(string toolName, string argumentsJson, HttpClient client, string mcpServerUrl){var payload new { name toolName, argumentsJson };var json System.Text.Json.JsonSerializer.Serialize(payload);var content new StringContent(json, Encoding.UTF8, application/json);var response await client.PostAsync(${mcpServerUrl.TrimEnd(/)}/mcp/invoke, content);if (!response.IsSuccessStatusCode){var error await response.Content.ReadAsStringAsync();throw new Exception($MCP tool call failed: {error});}var jsonResponse await response.Content.ReadFromJsonAsyncJsonElement();return jsonResponse.TryGetProperty(result, out var result) ? result.GetString()! : No result returned(Calling MCP).;}// 【获取全部可用的 MCP 工具】async Taskstring GetAvailableToolsAsync(HttpClient client, string mcpServerUrl){try{var response await client.GetStringAsync(${mcpServerUrl.TrimEnd(/)}/mcp/tools);var tools System.Text.Json.JsonSerializer.DeserializeMcpTool[](response);if (tools null || tools.Length 0)return No tools available.;// 动态生成工具描述var toolDescriptions string.Join(\n, tools.Select(t {var paramsText string.Join(,, t.InputSchema.Required);//return $- {t.Name}({paramsText}): {t.Description};//return $- {t.Name}: {t.Description};return $- {t.Name}({paramsText}): {t.Description}If you need to use a tool, respond with a JSON object in this exact format:{{tool: {t.Name}, arguments: {{{paramsText}: value}}}};}));return $You can use these external tools:{toolDescriptions}Only output the JSON when calling a tool. Otherwise, answer normally.;}catch (Exception ex){Console.WriteLine($Warning: Could not fetch tools from MCP server: {ex.Message});return No external tools available.; // 降级不启用工具调用}}// Mcptool.csusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Text.Json.Serialization;using System.Threading.Tasks;namespace McpClientApp.Models{// 根对象工具列表public class McpTool{[JsonPropertyName(name)]public string Name { get; set; }[JsonPropertyName(description)]public string Description { get; set; }[JsonPropertyName(inputSchema)]public InputSchema InputSchema { get; set; }}// inputSchema 对象public class InputSchema{[JsonPropertyName(type)]public string Type { get; set; } // 通常是 object[JsonPropertyName(properties)]public Dictionarystring, SchemaProperty Properties { get; set; }[JsonPropertyName(required)]public string[] Required { get; set; }}// 属性定义如 citypublic class SchemaProperty{[JsonPropertyName(type)]public string Type { get; set; } // string, number, boolean 等[JsonPropertyName(description)]public string Description { get; set; }}}2.2.3 测试结果You: 你是谁LLM Export: 我是阿里云研发的一款超大规模语言模型我叫通义千问。AnswerNo MCP: 我是阿里云研发的一款超大规模语言模型我叫通义千问。You: 现在北京时间是多少LLM Export: { tool: GetCurrentTime, arguments: { city: 北京 } }Calling MCP tool: GetCurrentTime with { city: 北京 }Final AnswerMCP: 根据当前系统北京时间是2023-3-16 15:48:19 但请注意这可能不是一个准确的实时时间因为我在处理 请求时的时间可能会有些延迟。建议您通过官方时间服务或手机自带的时间同步功能获取最精确的时间信息。注意针对本示例中使用的大模型qwen:7b输出并不稳定存在本地时间返回异常情况仅供理解思路吧。后续博主还会继续测试逐步优化。2.3 使用新版的千问大模型测试qwen3:8b【推荐使用】为什么要使用新版的大模型对比旧版的大模型新版的输出就比较稳定了。另外新版大模型在接口调用中返回了think标签内容标识每次都会对指令进行分析所得出的结果也比较准确。You: 现在北京时间是多少LLM Export: think好的用户问现在北京时间是多少。我需要用 GetCurrentTime 工具来获取。工具的参数是城市所以我要指定城 市为北京。然后按照要求返回JSON对象调用工具。确保格式正确不添加其他内容。检查一下参数是否正确城市名称是否准确。确认无误后生成响应。/think{tool: GetCurrentTime, arguments: {city: 北京}}Calling MCP tool: GetCurrentTime with {city: 北京}Calling MCP toolResult: The current time in is 13:50 on 2025-09-30.Final AnswerMCP: think好的用户之前问了北京时间我调用了GetCurrentTime工具参数是北京。现在工具返回了结果显示当前时间是2025年9月30日13:50。需要确认返回的格式是否正确有没有错误。用户可能是在确认时间或者有安排需要知道准确时间。可能用户所在时区不同需要明确是北京时间。另外检查日期和时间是否正确确保没有时区错误。然后用自然的中文回复用户保持简洁。比如直接告诉用户当前北京时间是13:50日期是2025年9月30日。不需要额外信息除非用户有进一步问题。确保回答清晰准确。/think当前北京时间是2025年9月30日13:50。其中最终的输出为Final AnswerMCP:think好的用户之前问了北京时间我调用了GetCurrentTime工具参数是北京。现在工具返回了结果显示当前时间是2025年9月30日13:50。需要确认返回的格式是否正确有没有错误。用户可能是在确认时间或者有安排需要知道准确时间。可能用户所在时区不同需要明确是北京时间。另外检查日期和时间是否正确确保没有时区错误。然后用自然的中文回复用户保持简洁。比如直接告诉用户当前北京时间是13:50日期是2025年9月30日。不需要额外信息除非用户有进一步问题。确保回答清晰准确。/think当前北京时间是2025年9月30日13:50。前一段为思考过程后边为实际返回的结果。代码中要调整的内容具体的代码可以查看上一章节此处不再赘述只需调整其中的两点1在第三步得到大模型第一次返回后解析返回结果时要先把思考内容剔除如下// 3. 尝试解析为工具调用var res_arr ollamaResponse.Split(/think);using var jsonDoc JsonDocument.Parse(res_arr[1]);2把代码中的模型版本换成新的qwen3:8b。在 ollama 中安装新版大模型// 在 ollama 中安装C:\Usersollama pull qwen3:8b// 查看已安装的大模型C:\Usersollama listNAME ID SIZE MODIFIEDqwen3:8b 500a1f067a9f 5.2 GB 1 hours agoqwen:7b 2091ee8c8d8f 4.5 GB 1 days ago// 运行新版模型尝试对话C:\Usersollama run qwen3:8b 你是谁Thinking...嗯用户问我是谁这应该是一个常见的问题。首先我需要确认用户是想了解我的基本身份还是有更深层次的需求。可能用户刚接触这个系统或者对我的功能不太清楚。接下来我应该简要介绍我的身份比如我是通义千问由通义实验室研发基于大规模语言模型。同时要强调我的功能比如回答问题、创作文字、编程等这样用户能了解我的用途。还要注意用户的潜在需求比如他们可能想知道我是否可靠或者是否有特定的功能需要使用。这时候可以提到我的训练数据和应用场景让用户更放心。另外用户可能没有明确说明他们需要什么帮助所以主动询问是否需要进一步协助是个好主意。这样既能提供帮助又能引导用户更具体地表达需求。最后保持回答简洁明了避免使用过于专业的术语让用户容易理解。同时保持友好和专业的语气让用户感到舒适和信任。...done thinking.我是通义千问由通义实验室研发的超大规模语言模型。我能够回答问题、创作文字、编程、逻辑推理以及多语言理解等。我的训练数据来自互联网上的大量文本能够理解和生成多种语言的内容。如果你有任何问题或需要帮助欢迎随时告诉我需要我帮你做些什么吗 Send a message (/? for help)MCP C# 示例参考https://www.cnblogs.com/edisontalk/p/-/introduction-to-mcp-csharp-sdk。本文来自博客园作者橙子家欢迎微信扫码关注博主【橙子家czzj】有任何疑问欢迎沟通共同成长转载本文请注明原文链接https://www.cnblogs.com/hnzhengfy/p/19074152/mcp_dotnet8分类: AI标签: 其他好文要顶 关注我 收藏该文 微信分享橙子家粉丝 - 85 关注 - 11加关注10« 上一篇 接口 IResultFilter、IAsyncResultFilter 的简介和用法示例.net» 下一篇 log4net 简介以及简单示例.net8posted 2025-09-29 20:06 橙子家 阅读(758) 评论(2) 收藏 举报刷新页面返回顶部登录后才能查看或发表评论立即 登录 或者 逛逛 博客园首页【推荐】注册成为HarmonyOS开发者支持博客园HarmonyOS社区建设【推荐】英博云GPU容器服务平台智能算力即开即用立即免费试用【推荐】科研领域的连接者艾思科蓝一站式科研学术服务数字化平台【推荐】诚邀您体验阿里巴巴推出的新一代 Agentic 编程平台 Qoder公告image欢迎关注我的公众号【橙子家czzj】可以随时随地查看历史博文还可以第一时间接收推送image昵称 橙子家园龄 6年1个月粉丝 85关注 11加关注 2025年12月 日 一 二 三 四 五 六30 1 2 3 4 5 67 8 9 10 11 12 1314 15 16 17 18 19 2021 22 23 24 25 26 2728 29 30 31 1 2 34 5 6 7 8 9 10随笔分类AI(1)C# 基础(61)C# 进阶(13)Docker(3)GO 基础(16)IIS(2)k8s(6)Linux(5)Nginx(5)加密知多少(8)架构篇(1)其他(5)前端(30)数据结构(1)数据库(14)正则表达式(1)随笔档案2025年11月(2)2025年10月(3)2025年9月(1)2025年8月(1)2025年7月(1)2025年6月(2)2025年5月(2)2025年4月(4)2025年3月(3)2025年2月(2)2025年1月(1)2024年12月(1)2024年11月(3)2024年10月(3)2024年9月(4)2024年8月(3)2024年7月(3)2024年6月(4)2024年5月(1)2024年4月(2)2024年3月(3)2024年2月(1)2024年1月(1)2023年12月(2)2023年11月(1)2023年10月(7)2023年9月(5)2023年8月(8)2023年7月(10)2023年6月(2)更多阅读排行榜1. nodejs 和 npm 版本对应关系(23492)2. C# System.Threading.Timer 详解及示例(17204)3. C# 多线程访问之 SemaphoreSlim信号量【进阶篇】(12406)4. Redis 的安装与配置详解【Redis系列一】(10791)5. .NET Core 允许跨域的两种方式实现IIS 配置、C# 代码实现(9979)6. Element-UI 中的 Table行列的合并和样式、合计行配置等(8228)7. C# Replace一个熟悉而又陌生的替换(8024)8. Linux 文本文件编辑相关命令简介【Linux 常用命令系列二】(7274)9. Nginx 简介、安装与配置文件详解(7040)10. C# 如何设计一个好用的日志库【架构篇】(6394)推荐排行榜1. C# 9.0 添加和增强的功能【基础篇】(15)2. C# 中关于 T 泛型【C# 基础】(14)3. YAML 语法简介与 C# 操作示例(12)4. 关于 Task 简单梳理C#【并发编程系列_4】(12)5. DateTime 相关的操作汇总【C# 基础】(11)最新评论1. Re:Serilog 日志库简单实践三集中式日志与分析平台 Sinks.net8可以说是非常详细了--三合视角2. Re:Serilog 日志库简单实践二控制台与调试 Sinks.net887年老渔会的近期会把各类型的Sinks都简单时间一下--橙子家3. Re:Serilog 日志库简单实践二控制台与调试 Sinks.net8会持续更新吗--87年老渔4. Re:Serilog 日志库的简介橙子家 nb! 谢谢!!!...--手塚国光5. Re:Serilog 日志库的简介手塚国光 可以使用 .WriteTo.Conditional() 方法根据条件执行不同的配置。 下边是一个简单的示例可以参考测试。 Log.Logger new LoggerConfigur...--橙子家博客园 © 2004-2025浙公网安备 33010602011771号 浙ICP备2021040463号-3

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询