一个支持阿里云百炼平台DeepSeek R1大模型(智能体)的Wordpress插件,AI Agent or Chatbot.

本文涉及的产品
多模态交互后付费免费试用,全链路、全Agent
简介: 这是一个将阿里云DeepSeek AI服务集成到WordPress的聊天机器人插件,支持多轮对话、上下文记忆和自定义界面等功能。用户可通过短代码轻松添加到页面,并支持多种配置选项以满足不同需求。项目采用MIT协议授权,代码仓位于GitHub与Gitee。开发者Chi Leung为长期境外工作,代码注释以英文为主。适合需要在WordPress网站中快速部署AI助手的用户使用。

做的比较仓促,但能用。
MIT协议授权,想用拿去用,想改随便改。
多年境外,编码以英文为主,见谅。

GitHub仓:https://github.com/yaoniming3k/aliyun-deepseek-chatbot
GiTee仓:https://gitee.com/yaoniming3k/aliyun-deepseek-chatbot

以下是ReadMe.md:

aliyun-deepseek-chatbot

Aliyun DeepSeek AI ChatBot for WordPress

This plugin integrates the Aliyun DeepSeek AI service into your WordPress website, allowing visitors to interact with an AI assistant through a customizable chat interface.

该插件将阿里云 DeepSeek AI 服务集成到您的 WordPress 网站中,使访客能够通过可自定义的聊天界面与 AI 助手进行互动。

Features

  • Easy to set up and configure
  • Responsive chat interface that works on all devices
  • Customizable appearance and behavior
  • Multi-turn conversations with context memory
  • Optional display of AI's thinking process
  • Easy integration with shortcodes

功能特色

  • 简单设置与配置
  • 响应式聊天界面,兼容所有设备
  • 外观与行为可自定义
  • 支持多轮对话并具备上下文记忆
  • 可选显示 AI 的思考过程
  • 通过短代码轻松集成

Installation

  1. Upload the aliyun-deepseek-chatbot folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Configure the plugin settings with your Aliyun DeepSeek API credentials

OR

  1. Download zip file from Github.
  2. Install it as what you regular do to Wordpress plugin installation by wordpress dashboard.

安装

  1. 将 aliyun-deepseek-chatbot 文件夹上传至 /wp-content/plugins/ 目录
  2. 在 WordPress 的“插件”菜单中启用该插件
  3. 使用您的阿里云 DeepSeek API 凭证配置插件设置(智能体应用)

  1. 从 Github 下载插件的 zip 压缩包
  2. 通过 WordPress 仪表盘按照常规方式上传并安装该插件

Configuration

  1. Navigate to Settings > AI ChatBot in your WordPress admin dashboard
  2. Enter your Aliyun DashScope API Key and App ID
  3. Configure optional settings as needed:
    • Enable/disable multi-turn conversations
    • Show/hide AI thinking process
    • Adjust conversation history length

配置

  1. 在 WordPress 管理后台导航至 设置 > AI ChatBot
  2. 输入您的阿里云 DashScope API Key 和 App ID
  3. 根据需要配置可选设置:
    • 启用/禁用多轮对话
    • 显示/隐藏 AI 思考过程
    • 调整对话历史长度

Usage

Add the chatbot to any page or post using the shortcode:
[aliyun_chatbot]

使用方法

使用以下短代码即可将聊天机器人添加到任意页面或文章中:
[aliyun_chatbot]

Customization Options

You can customize the chatbot appearance and behavior using these attributes:
[aliyun_chatbot
title="Your Custom Title"
placeholder="Type your question..."
welcome_message="Hi there! How can I assist you today?"
show_clear="yes"
]

自定义选项

您可以使用以下属性自定义聊天机器人的外观和行为:
[aliyun_chatbot
title="自定义标题"
placeholder="请输入您的问题..."
welcome_message="你好!我可以为您提供哪些帮助?"
show_clear="yes"
]

Attribute Description Default
title The title displayed at the top of the chatbot "AI Assistant"
placeholder Placeholder text for the input field "Ask me anything..."
welcome_message Initial message from the chatbot "Hello! How can I help you today?"
show_clear Show clear conversation button (yes/no) "no"

API Configuration

This plugin requires the Aliyun DashScope API. You'll need:

  1. An Aliyun account with access to the DashScope service
  2. An API key from your Aliyun account
  3. A DeepSeek App ID from your Aliyun dashboard

API 配置

此插件需要使用阿里云 DashScope API。您需要具备以下条件:

  1. 一个已开通 DashScope 服务的阿里云账户
  2. 从您的阿里云账户获取的 API Key
  3. 来自阿里云控制台的 DeepSeek 应用 ID(App ID)

The API request format follows the Aliyun DeepSeek format:

API 请求格式遵循阿里云 DeepSeek R1 智能体的规范:

curl --location 'https://dashscope.aliyuncs.com/api/v1/apps/{YOUR_APP_ID}/completion'
--header 'Authorization: Bearer {YOUR_API_KEY}'
--header 'Content-Type: application/json'
--data '{
"input": {
"prompt": "User message here"
},
"parameters": {
"has_thoughts": true
}
}'

Directory Structure

aliyun-deepseek-chatbot/
├── aliyun-deepseek-chatbot.php # Main plugin file
├── includes/
│ ├── class-admin.php # Admin settings functionality
│ ├── class-frontend.php # Frontend display functionality
│ └── class-api-handler.php # API communication handling
├── assets/
│ ├── css/
│ │ ├── chatbot.css # Frontend styles
│ │ └── admin.css # Admin styles
│ └── js/
│ └── chatbot.js # Frontend JavaScript
└── languages/ # Translation files

Troubleshooting

If you encounter issues with the plugin:

  1. Check that your API Key and App ID are correctly entered
  2. Verify that your Aliyun account has access to the DeepSeek service
  3. Enable WP_DEBUG in your wp-config.php file to see detailed error messages
  4. Check your browser console for JavaScript errors
  5. Try the direct settings form in debug mode if the standard settings form isn't working

故障排查

如果您在使用插件时遇到问题,请按照以下步骤进行排查:

  1. 确认您已正确输入 API Key 和 App ID
  2. 验证您的阿里云账户是否已开通 DeepSeek 服务权限
  3. wp-config.php 文件中启用 WP_DEBUG 以查看详细的错误信息
  4. 检查浏览器控制台是否有 JavaScript 错误
  5. 如果标准设置表单无法使用,请在调试模式下尝试使用直接设置表单

License

This plugin is licensed under the MIT License.

Credits

Developed by Chi Leung (https://www.rockbrain.net)

相关文章
|
22天前
|
人工智能 数据处理 API
阿里云、Ververica、Confluent 与 LinkedIn 携手推进流式创新,共筑基于 Apache Flink Agents 的智能体 AI 未来
Apache Flink Agents 是由阿里云、Ververica、Confluent 与 LinkedIn 联合推出的开源子项目,旨在基于 Flink 构建可扩展、事件驱动的生产级 AI 智能体框架,实现数据与智能的实时融合。
213 6
阿里云、Ververica、Confluent 与 LinkedIn 携手推进流式创新,共筑基于 Apache Flink Agents 的智能体 AI 未来
|
14天前
|
人工智能 测试技术 API
构建AI智能体:二、DeepSeek的Ollama部署FastAPI封装调用
本文介绍如何通过Ollama本地部署DeepSeek大模型,结合FastAPI实现API接口调用。涵盖Ollama安装、路径迁移、模型下载运行及REST API封装全过程,助力快速构建可扩展的AI应用服务。
300 6
|
16天前
|
人工智能 运维 安全
加速智能体开发:从 Serverless 运行时到 Serverless AI 运行时
在云计算与人工智能深度融合的背景下,Serverless 技术作为云原生架构的集大成者,正加速向 AI 原生架构演进。阿里云函数计算(FC)率先提出并实践“Serverless AI 运行时”概念,通过技术创新与生态联动,为智能体(Agent)开发提供高效、安全、低成本的基础设施支持。本文从技术演进路径、核心能力及未来展望三方面解析 Serverless AI 的突破性价值。
|
18天前
|
人工智能 搜索推荐 数据可视化
当AI学会“使用工具”:智能体(Agent)如何重塑人机交互
当AI学会“使用工具”:智能体(Agent)如何重塑人机交互
239 115
|
14天前
|
人工智能 API 开发工具
构建AI智能体:一、初识AI大模型与API调用
本文介绍大模型基础知识及API调用方法,涵盖阿里云百炼平台密钥申请、DashScope SDK使用、Python调用示例(如文本情感分析、图像文字识别),助力开发者快速上手大模型应用开发。
519 16
构建AI智能体:一、初识AI大模型与API调用
|
13天前
|
存储 机器学习/深度学习 人工智能
构建AI智能体:三、Prompt提示词工程:几句话让AI秒懂你心
本文深入浅出地讲解Prompt原理及其与大模型的关系,系统介绍Prompt的核心要素、编写原则与应用场景,帮助用户通过精准指令提升AI交互效率,释放大模型潜能。
209 5
|
15天前
|
机器学习/深度学习 人工智能 JSON
PHP从0到1实现 AI 智能体系统并且训练知识库资料
本文详解如何用PHP从0到1构建AI智能体,涵盖提示词设计、记忆管理、知识库集成与反馈优化四大核心训练维度,结合实战案例与系统架构,助你打造懂业务、会进化的专属AI助手。
116 6
|
22天前
|
存储 人工智能 前端开发
超越问答:深入理解并构建自主决策的AI智能体(Agent)
如果说RAG让LLM学会了“开卷考试”,那么AI智能体(Agent)则赋予了LLM“手和脚”,使其能够思考、规划并与真实世界互动。本文将深入剖析Agent的核心架构,讲解ReAct等关键工作机制,并带你一步步构建一个能够调用外部工具(API)的自定义Agent,开启LLM自主解决复杂任务的新篇章。
218 6
|
21天前
|
人工智能 JSON 安全
Claude Code插件系统:重塑AI辅助编程的工作流
Anthropic为Claude Code推出插件系统与市场,支持斜杠命令、子代理、MCP服务器等功能模块,实现工作流自动化与团队协作标准化。开发者可封装常用工具或知识为插件,一键共享复用,构建个性化AI编程环境,推动AI助手从工具迈向生态化平台。
226 1

相关产品

  • 大模型服务平台百炼