intriguingtiles / cleverbot-free Goto Github PK
View Code? Open in Web Editor NEWSimple package to interact with the same API that the Cleverbot website uses for free.
License: MIT License
Simple package to interact with the same API that the Cleverbot website uses for free.
License: MIT License
/Abuse/AbuseV3/node_modules/cleverbot-free/index.js:49
.set("Cookie", ${cookies[0].split(";")[0]}; _cbsid=-1
)
^
TypeError: Cannot read properties of undefined (reading '0')
at module.exports (/Abuse/AbuseV3/node_modules/cleverbot-free/index.js:49:42)
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Please add a feature where we can set the language for the reply, as of now reply is mostly in english but sometimes its in random languages
When attempting to start a conversation with the chatbot the only response returned is Forbidden.
Stopped working without changes to my code about a week ago.
Hi! I'm sort of a novice to programming and I keep getting this error in my React/JS program and open it up on localhost:3000
Access to XMLHttpRequest has been blocked by CORS policy No Access-Control-Allow-Origin header found
How do I fix this? I'm not really sure how and where to add said header either... Sorry for the dumb question
the conversation goes like this:
me: my name is jimmy remember that
bot: hello, tavin!
me: what is my name?
bot: i don't know
... (2 lines later)
bot: can we high five
me: why?
bot: i feel sick.
pretty sure that doesnt make sense. either its me that's not using context correctly (my context array is basically pushing user response then bot response to an array like ["user_response", "bot_response", "user_response", "bot_response"] etc.)
Hello, I get a "503" error with heavy use. How can I fix this problem?
Example Code:
const IntriguingTiles = require('cleverbot-free')
setInterval(function(){
IntriguingTiles('Hello.').then((IntriguingTiles_is_best) => {
console.log(IntriguingTiles_is_best);
})
}, 1000);
Error: Request failed with status code 503
im a beginner coder with javascript, how exactly would you get the response bit of this code to work? aka connect it to a function or something. google didn't come up with anything even remotely useful
and yes I know this is an extremely simple question but nothing else gave me a response so here I am
thankz in advance
I guess cleverbot owners fucked up this module.
It returns "You can have a great chat at www.cleverbot.com." on any message.
There is a critical vulnerability with formidable
that cannot be patched without updating this package.
This package relies on superagent
, which relies on formidable
.
Updating superagent
will require updating to major version 9, because all older versions have been deprecated due to this vulnerability.
As the deprecation note warns, this will also change your node
version compatibility.
Just in the past day, this package has begun throwing 502 bad gateway errors.
Also, the API Status workflow stopped running 3 weeks ago, so the API status bar in the README is no longer accurate.
"Service Unavailable" error with long cleverbot-free usage
I have a Discord Bot, and because of its high usage, an error like this comes up at the end.
I tried to fix it, I've been working for 5 hours. I examined the codes of Cleverbot.com and discovered that it is related to the "XVIS" cookie. How can I fix this? Thanks.
Error: Service Unavailable
at Request.callback (C:\Users\lenovo\Desktop\Testing\node_modules\superagent\lib\node\index.js:883:15)
at IncomingMessage. (C:\Users\lenovo\Desktop\Testing\node_modules\superagent\lib\node\index.js:1126:20)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (_stream_readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
status: 503,
response: <ref *1> Response {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
res: IncomingMessage {
_readableState: [ReadableState],
_events: [Object: null prototype],
_eventsCount: 4,
_maxListeners: undefined,
socket: [TLSSocket],
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers: [Object],
rawHeaders: [Array],
trailers: {},
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 503,
statusMessage: 'Service Temporarily Unavailable',
client: [TLSSocket],
_consuming: false,
_dumped: false,
req: [ClientRequest],
text: '\r\n' +
'<title>503 Service Temporarily Unavailable</title>\r\n' +
'\r\n' +
'
Error: Forbidden
at Request.callback (F:\node_modules\cleverbot-free\node_modules\superagent\lib\node\index.js:921:17)
at IncomingMessage.<anonymous> (F:\node_modules\cleverbot-free\node_modules\superagent\lib\node\index.js:1165:20)
at IncomingMessage.emit (node:events:532:35)
at endReadableNT (node:internal/streams/readable:1346:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
status: 403,
Cleverbot opens fine on browser
_header: 'GET /extras/conversation-social-min.js?20220528 HTTP/1.1\r\n' +
'Host: www.cleverbot.com\r\n' +
'Accept-Encoding: gzip, deflate\r\n' +
'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36\r\n' +
'Connection: close\r\n' +
'\r\n',
...
text: '<html>\r\n' +
'<head><title>403 Forbidden</title></head>\r\n' +
'<body bgcolor="white">\r\n' +
'<center><h1>403 Forbidden</h1></center>\r\n' +
'<hr><center>nginx/1.14.0</center>\r\n' +
'</body>\r\n' +
'</html>\r\n' +
'<!-- a padding to disable MSIE and Chrome friendly error page -->\r\n' +
'<!-- a padding to disable MSIE and Chrome friendly error page -->\r\n' +
'<!-- a padding to disable MSIE and Chrome friendly error page -->\r\n' +
'<!-- a padding to disable MSIE and Chrome friendly error page -->\r\n' +
'<!-- a padding to disable MSIE and Chrome friendly error page -->\r\n' +
'<!-- a padding to disable MSIE and Chrome friendly error page -->\r\n',
My and my friends all speak English however sometimes the bot replies in random languages like Turkish, Polish, Spanish, etc despite us all using English with the bot
No matter the response inputted it outputs "You can have a great chat at www.cleverbot.com"
It timeouts sometimes and the responds taking longer than before.
Also when it responds does the answers mostly make no sense
exp when i ask "How are you" it answers "mph" or in a other language.
That came with the new update, before that everything was fine
Only the last two elements of the array are considered as context!
Me: You are a bot.
Bot: No Im not. I can prove it.
Me: Prove it!
Bot: Forgets the first sentence(You are a robot) and gives a nonsense response
(node:7156) UnhandledPromiseRejectionWarning: Error: Not Found at Request.callback (C:\Users\bradp\OneDrive\Desktop\w\node_modules\superagent\lib\node\index.js:883:15) at IncomingMessage.<anonymous> (C:\Users\bradp\OneDrive\Desktop\w\node_modules\superagent\lib\node\index.js:1126:20) at IncomingMessage.emit (events.js:327:22) at endReadableNT (_stream_readable.js:1220:12) at processTicksAndRejections (internal/process/task_queues.js:84:21) (node:7156) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag '--unhandled-rejections=strict' (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:7156) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I'm getting this error. I assume it was due to a change by Cleverbot API so it broke the package.
I have been using this api in my discord bot and the bot seems and I seem to have problem with contexts. Like if I say "my name is frog" and ask the bot "what is my name" it replies with "I dont know" or something like that.
We have many things like this in our server like "tai is your master" and we make the bot remember many things like that but this api only supports one context is there a way to add multiple contexts?
Thanks.
i think the website content changed or something? i'm on 1.1.1
and the bot keeps responding with "You can have a great chat in www.cleverbot.com" no matter what i send
I have a constantly-running bot that depends on this node module. After few weeks, this module will begin throwing TypeError: Cannot read properties of undefined (reading 'split')
every time a response is requested. Restarting the bot fixes the issue, at least for another couple weeks.
I suspect the error is coming from lines 52-54 of index.js when req.text
is undefined. I don't know why it would be undefined, or why the error won't go away until I restart the bot.
Because of the infrequent nature of this error, it is hard to reproduce, otherwise I would provide screenshots of the error output.
I recently migrated one of my projects from JavaScript to TypeScript, and then from CommonJS to EMCAScript modules (ESM).
While you have added types to cleverbot-free, they do not work correctly when using ESM.
Here is an example of the error I am getting.
As you can see, the type of cleverbot
is not being imported correctly.
I did some research, and found some relevant threads here and here.
It appears that the problem may be fixed by adding "type": "module"
to package.json so the types can be interpreted as ESM types.
I modified cleverbot-free's package.json in the node_modules
of my project, and it fixed the issue.
As you can see, the type is now being imported correctly and TypeScript can compile.
Alternatively, you could also fix the problem by changing export default cleverbot
to export = cleverbot
in index.d.ts, but that might not be backwards-compatible to pre-node16 ESM versions? Not sure.
Here is an additional resource: https://arethetypeswrong.github.io/?p=cleverbot-free%401.1.12
Hello,
The reason you keep having to fix your code and put a message which says "Please use the official Cleverbot API as the Cleverbot developers can easily break this package at any time." - is because we are trying to break your package. You are hacking into an internal communication method between our website and servers. Our servers cost a lot to run so we need the revenue from people visiting the site and clicking the ads, or registering and paying for the official Cleverbot API. We kindly request that you disable this Github project. We will also contact Github and ask them to disable the project.
Thank you,
Paul (Existor Ltd)
No matter what is inputted it returns undefined.
What are the possible values for the language
param? should it be pt-BR
or ptBR
or just pt
?
a suggest that you type it instead of use string as the type, something like:
type Language = 'en' | 'pt' | 'other languages'...
Edit:
Just found out, this are the possible values:
["af", "id", "ms", "ca", "cs", "da", "de", "en", "es", "eu", "ti", "fr", "gl", "hr", "zu", "is", "it", "lt", "hu", "nl", "no", "pl", "pt", "ro", "sl", "fi", "sv", "vi", "tr", "el", "bg", "ru", "sr", "uk", "ko", "zh", "ja", "hi", "th"]
Hello,
the previous error has been fixed. However, if it is in use for more than 40 minutes, the "Error: Response timeout of 5000ms exceded." Gives a fault.
Thanks for your help <3
How can use with turkish lang support.
I wanna use with proper lang ?
how can do that?
examples: tr_TR,en_EN
Just need to know if this is temporary or should I change my code to account for long delays?
(node:4511) UnhandledPromiseRejectionWarning: Error: Forbidden
at Request.callback (/AbuseV3/node_modules/superagent/lib/node/index.js:883:15)
at IncomingMessage. (/AbuseV3/node_modules/superagent/lib/node/index.js:1126:20)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)`
When trying to use Cleverbot. The latest version ([email protected])
This issue is also affecting the actual cleverbot site. Refreshing fixes it but it's not entirely clear to me why it does.
I receive this warning when running npm install
:
npm WARN deprecated [email protected]: Please downgrade to v7.1.5 if you need IE/ActiveXObject support OR upgrade to v8.0.0 as we no longer support IE and published an incorrect patch version (see https://github.com/visionmedia/superagent/issues/1731)
.
In version 1.1.1, cleverbot-free gave "undefined" as the result today, when I looked at the NPM page I saw that there was a new version "1.1.2", after I updated it cleverbot-free was still giving me "undefined" as a result.
Soo is it going to be fixed today?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.