Home Backend Development PHP Tutorial PIGCMS 如何关闭聊天机器人_PHP

PIGCMS 如何关闭聊天机器人_PHP

May 31, 2016 pm 01:17 PM
chatbot

无脑操作举例

1、找到 WeixinAction.class.php 文件,路径: 你的版本\PigCms\Lib\Action\Home

2、查询 function chat ,在 chat() 函数中修改 return 值

代码如下:


return 'str_replace('highsea', 'hi', $str)';//举个例子

为,如下:
return '亲,请等待客服回复~';

3、(可选)最后注释掉“小黄鸡”部分(可以不注释也可以):

代码如下:


/*小黄鸡*/
/*$str  = 'http://api.bd001.com/iMicms_com/api.php?key=free&appid=0&msg=' . urlencode($name);
$json = Http::fsockopenDownload($str);
if ($json == false) {
    $json = file_get_contents($str);
}
$json = json_decode($json, true);
$str  = str_replace('HighSea', $this->my, str_replace('提示:', $this->my . '提醒您:', str_replace('{br}', "\n", $json['content'])));*/

•总结:该操作不会影响公众号其他关键字的回复,只针对回答不上来的问题(本来是请求 小黄鸡 )现在直接 回复:“亲,请等待客服回复~”;如需修改其他得操作源码

•如果优化一下,可以这样:

先统一配置一个回答(或者请求 自己的接口服务器 ),当访客回复如“小黄鸡”时再请求小黄鸡的接口…… 源码就不举例了~

小伙伴们学会如何在PIGCMS里关闭聊天机器人了吧,希望本文能对大家有所帮助。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Xiaohongshu begins testing AI chatbot 'Da Vinci' Xiaohongshu begins testing AI chatbot 'Da Vinci' Jan 15, 2024 pm 12:42 PM

Xiaohongshu is working to enrich its products by adding more artificial intelligence features. According to domestic media reports, Xiaohongshu is internally testing an AI application called "Davinci" in its main app. It is reported that the application can provide users with AI chat services such as intelligent question and answer, including travel guides, food guides, geographical and cultural knowledge, life skills, personal growth and psychological construction, etc. According to reports, "Davinci" uses the LLAMA model under Meta A product for training, the product has been tested since September this year. There are rumors that Xiaohongshu was also conducting an internal test of a group AI conversation function. Under this function, users can create or introduce AI characters in group chats, and have conversations and interactions with them. Image source: T

How to develop an intelligent chatbot using ChatGPT and Java How to develop an intelligent chatbot using ChatGPT and Java Oct 28, 2023 am 08:54 AM

In this article, we will introduce how to develop intelligent chatbots using ChatGPT and Java, and provide some specific code examples. ChatGPT is the latest version of the Generative Pre-training Transformer developed by OpenAI, a neural network-based artificial intelligence technology that can understand natural language and generate human-like text. Using ChatGPT we can easily create adaptive chats

Why Chatbots Can't Completely Replace Humans Why Chatbots Can't Completely Replace Humans May 09, 2023 pm 12:31 PM

The Importance of Creativity, Empathy, and Authenticity in Customer Service and Writing In this blog post, we discuss the pros and cons of using chatbots in the customer service and writing industry. While chatbots can provide fast and accurate responses to customer inquiries, they lack the creativity, empathy, and authenticity that human writers and customer service representatives possess. We will also discuss the ethical issues surrounding the use of chatbots and artificial intelligence in general. Overall, chatbots should be viewed as a complement rather than a replacement for human labor. Learn more about the role of chatbots in the workforce in this article. I understand the concerns many people have about the potential of AI to replace human workers. Specifically, there has been speculation about the potential for chatbots to replace human customer service

How to develop an AI-based smart chatbot using Java How to develop an AI-based smart chatbot using Java Sep 21, 2023 am 10:45 AM

How to use Java to develop an intelligent chatbot based on artificial intelligence. With the continuous development of artificial intelligence technology, intelligent chatbots are becoming more and more widely used in various application scenarios. Developing an intelligent chatbot based on artificial intelligence can not only improve user experience, but also save labor costs for enterprises. This article will introduce how to use Java language to develop an intelligent chatbot based on artificial intelligence and provide specific code examples. Determine the function and domain of the bot. Before developing an intelligent chatbot, you first need to determine

The perfect combination of ChatGPT and Python: building a real-time chatbot The perfect combination of ChatGPT and Python: building a real-time chatbot Oct 28, 2023 am 08:37 AM

The perfect combination of ChatGPT and Python: Building a real-time chatbot Introduction: With the rapid development of artificial intelligence technology, chatbots play an increasingly important role in various fields. Chatbots can help users provide immediate and personalized assistance while also providing businesses with efficient customer service. This article will introduce how to use OpenAI's ChatGPT model and Python language to create a real-time chat robot, and provide specific code examples. 1. ChatGPT

Xiaohongshu internally tests Da Vinci AI chatbot 'Davinic' Xiaohongshu internally tests Da Vinci AI chatbot 'Davinic' Jan 05, 2024 pm 10:57 PM

News from ChinaZ.com on December 25: According to Tech Planet, Xiaohongshu has internally tested an AI function called “Davinic” in its main APP. This function has been tested since September and is still ongoing. This is also another new AI application launched by Xiaohongshu after the AI ​​group chat. "Davinic" mainly provides users with AI chat functions such as intelligent question and answer. "Davinic" is more focused on providing questions and answers about the good life, including travel guides, food guides, geographical and cultural knowledge, life skills, personal growth and psychological advice, as well as activity recommendations and other fields. According to reports, "Davinic" is based on LLAMA large model under Meta

Supports Chinese dialogue! New NVIDIA ChatRTX updated Supports Chinese dialogue! New NVIDIA ChatRTX updated Jun 09, 2024 am 11:25 AM

As early as February, NVIDIA launched the LLM-based chatbot ChatwithRTX. In May, the chatbot was updated, adding new models and new functions, the packaging package was also reduced from 35G to 11G, and the software was officially renamed ChatRTX. In the previous article and video about ChatwithRTX, we mentioned that ChatwithRTX does not have its own Chinese reply. If you want to implement Chinese answers, you need to install your own environment, large language models, etc. But this step has a relatively high threshold for users, and they have to go through many complicated steps to achieve Chinese question and answer. Before the introduction, let’s briefly talk about what ChatRTX is.

A technical guide to chatbots in PHP A technical guide to chatbots in PHP May 20, 2023 pm 11:21 PM

As a popular programming language, PHP has been widely used in web development. As artificial intelligence technology continues to improve, more and more developers are trying to use PHP to build chatbots. Chatbots have become an extremely useful tool that can automatically answer users’ questions, provide entertainment, and help users complete daily tasks. In this article, we will introduce how to build a chatbot using PHP. The basic principle of chat robot The principle of chat robot is to use natural language processing technology to

See all articles