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

简介: 这是一个将阿里云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)

目录
打赏
0
28
28
7
13
分享
相关文章
阿里云百炼X支付宝:「AI打赏」功能上线,Agent变现更灵活🎉🎉🎉
阿里云百炼平台联合支付宝,推出业内首个Agent「AI打赏」功能,开发者可为应用一键配置赞赏功能,用户打赏金额将直接转入开发者支付宝账户,助力快速变现。
200 1
Springboot集成AI Springboot3 集成阿里云百炼大模型CosyVoice2 实现Ai克隆语音(未持久化存储)
本项目基于Spring Boot 3.5.3与Java 17,集成阿里云百炼大模型CosyVoice2实现音色克隆与语音合成。内容涵盖项目搭建、音色创建、音频合成、音色管理等功能,适用于希望快速掌握Spring Boot集成语音AI技术的开发者。需提前注册阿里云并获取API Key。
【阿里云百炼全栈焕新】DAY1—智能体配置教程-打造抖音小助手
在短视频盛行的时代,抖音已成为内容创作和营销的重要平台。面对海量视频与复杂运营需求,如何高效管理内容成为挑战。阿里云百炼平台提供了解决方案——通过配置智能体打造专属抖音助手,可获取视频信息、提取文案、润色改写,提升效率。本文详解了从开通服务、创建智能体到功能测试的全过程,助你轻松搭建高效短视频运营工具。
333 2
阿里云百炼开源面向 Java 开发者的 NL2SQL 智能体框架
Spring-ai-alibaba-nl2sql 是析言 GBI 产品在数据问答领域的一次重要开源尝试,专注于 NL2SQL 场景下的核心能力开放。
541 48
【自定义插件系列】0基础在阿里云百炼上玩转大模型自定义插件
本文介绍了如何在阿里云百炼平台上创建大模型自定义插件,以增强AI模型功能或适配特定需求。通过编程接口(API)或框架设计外部扩展模块,开发者可在不修改底层参数的情况下扩展模型能力。文章以万相文生图V2版模型为例,详细说明了创建自定义插件的五个步骤:新建插件、创建工具、测试工具、复制第二个工具及最终测试发布。同时,提供了官方文档参考链接和具体参数设置指导,帮助用户轻松实现插件开发与应用,推动AI技术在各行业的广泛应用。
1347 156
|
2月前
|
#我用Qwen3做了旅游专家# 、#阿里云百炼#、@通义大模型
本教程介绍如何在百炼控制台配置智能体应用以提升旅游专家功能。首先登录百炼控制台,依次点击“应用”、“应用管理”和“智能体应用”,然后进入“设置”填写提示词。通过集成MCP高德地图与Qwen3模型,使旅游专家的回答更具体、专业,涵盖目的地导航、当地饮食、风俗习惯及天气预报等信息,显著提高用户体验与出行便利性,同时加深对智能体配置的理解。
130 10
|
2月前
#我用Qwen3做了英语老师玛丽# 、#阿里云百炼#,@通义大模型
通过Qwen3创建了名为“玛丽”的英语老师智能体,具备解决学生英语问题的多种功能。她能用英语描述天气、翻译古诗词、撰写英语作文,还帮助了解外国文化、饮食与风俗习惯。相比以往版本更易使用,体验更佳。已完成功能设计与发布流程,感兴趣者可尝试使用。
123 12

相关产品

  • 大模型服务平台百炼
  • AI助理
    登录插画

    登录以查看您的控制台资源

    管理云资源
    状态一览
    快捷访问

    你好,我是AI助理

    可以解答问题、推荐解决方案等