Coder Social home page Coder Social logo

cleverbot-free's People

Contributors

catboycoding avatar intriguingtiles avatar jstnmcbrd avatar lukhajek avatar milo123459 avatar sefinek24 avatar zomoxyz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cleverbot-free's Issues

Cookie error

/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)

Feature Request

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

Access to XMLHttpRequest has been blocked?

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

weird responses (despite having context)

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.)

503 Error

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

how would you get the response part to work?

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

Critical vulnerability in `formidable` cannot be patched

There is a critical vulnerability with formidable that cannot be patched without updating this package.

image

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.

image

As the deprecation note warns, this will also change your node version compatibility.

HTTP Error 502: Bad Gateway

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.

Error: Service Unavailable

"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' +
'

503 Service Temporarily Unavailable

\r\n' +
'
nginx/1.14.0\r\n' +
'\r\n' +
'\r\n' +
'\r\n' +
'\r\n' +
'\r\n' +
'\r\n' +
'\r\n' +
'\r\n',
[Symbol(kCapture)]: false,
[Symbol(RequestTimeout)]: undefined
},
request: Request {
_events: [Object: null prototype],
_eventsCount: 1,
_maxListeners: undefined,
_enableHttp2: false,
_agent: false,
_formData: null,
method: 'POST',
url: 'https://www.cleverbot.com/webservicemin?uc=UseOfficialCleverbotAPI',
_header: [Object],
header: [Object],
writable: true,
_redirects: 0,
_maxRedirects: 5,
cookies: '',
qs: {},
_query: [],
qsRaw: [],
_redirectList: [],
_streamRequest: false,
_data: 'stimulus=Hello&cb_settings_scripting=no&islearning=1&icognoid=wsf&icognocheck=794b591c123983cffd89b144241d7ea2',
req: [ClientRequest],
protocol: 'https:',
host: 'www.cleverbot.com',
_endCalled: true,
_callback: [Function (anonymous)],
_fullfilledPromise: [Promise],
res: [IncomingMessage],
_resBuffered: true,
response: [Circular *1],
called: true,
[Symbol(kCapture)]: false
},
req: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 3,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 110,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [TLSSocket],
_header: 'POST /webservicemin?uc=UseOfficialCleverbotAPI HTTP/1.1\r\n' +
'Host: www.cleverbot.com\r\n' +
'Accept-Encoding: gzip, deflate\r\n' +
'Cookie: XVIS=TE1939AFFIAGAYQZA6710;Path=/;Max-Age=5000\r\n' +
'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36\r\n' +
'Content-Type: text/plain\r\n' +
'Content-Length: 110\r\n' +
'Connection: close\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: noopPendingOutput],
agent: [Agent],
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/webservicemin?uc=UseOfficialCleverbotAPI',
_ended: true,
res: [IncomingMessage],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'www.cleverbot.com',
protocol: 'https:',
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype]
},
text: '\r\n' +
'<title>503 Service Temporarily Unavailable</title>\r\n' +
'\r\n' +
'

503 Service Temporarily Unavailable

\r\n' +
'
nginx/1.14.0\r\n' +
'\r\n' +
'\r\n' +
'\r\n' +
'\r\n' +
'\r\n' +
'\r\n' +
'\r\n' +
'\r\n',
body: {},
files: undefined,
buffered: true,
headers: {
server: 'nginx/1.14.0',
date: 'Thu, 22 Apr 2021 18:51:34 GMT',
'content-type': 'text/html',
'content-length': '615',
connection: 'close'
},
header: {
server: 'nginx/1.14.0',
date: 'Thu, 22 Apr 2021 18:51:34 GMT',
'content-type': 'text/html',
'content-length': '615',
connection: 'close'
},
statusCode: 503,
status: 503,
statusType: 5,
info: false,
ok: false,
redirect: false,
clientError: false,
serverError: true,
error: Error: cannot POST /webservicemin?uc=UseOfficialCleverbotAPI (503)
at Response.toError (C:\Users\lenovo\Desktop\Testing\node_modules\superagent\lib\node\response.js:98:13)
at ResponseBase._setStatusProperties (C:\Users\lenovo\Desktop\Testing\node_modules\superagent\lib\response-base.js:119:48)
at new Response (C:\Users\lenovo\Desktop\Testing\node_modules\superagent\lib\node\response.js:44:8)
at Request._emitResponse (C:\Users\lenovo\Desktop\Testing\node_modules\superagent\lib\node\index.js:930:18)
at IncomingMessage. (C:\Users\lenovo\Desktop\Testing\node_modules\superagent\lib\node\index.js:1126:42)
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,
text: '\r\n' +
'<title>503 Service Temporarily Unavailable</title>\r\n' +
'\r\n' +
'

503 Service Temporarily Unavailable

\r\n' +
'
nginx/1.14.0\r\n' +
'\r\n' +
'\r\n' +
'\r\n' +
'\r\n' +
'\r\n' +
'\r\n' +
'\r\n' +
'\r\n',
method: 'POST',
path: '/webservicemin?uc=UseOfficialCleverbotAPI'
},
created: false,
accepted: false,
noContent: false,
badRequest: false,
unauthorized: false,
notAcceptable: false,
forbidden: false,
notFound: false,
unprocessableEntity: false,
type: 'text/html',
links: {},
setEncoding: [Function: bound ],
redirects: [],
pipe: [Function (anonymous)],
[Symbol(kCapture)]: false
}
}:

403 forbidden

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',

Bot responds in many languages.

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

Context Escapes!

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

Unsuccessful HTTP 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.

Using multiple contexts

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.

new issue

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

Throws "TypeError: Cannot read properties of undefined (reading 'split')"

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.

Typescript types don't import correctly when using ESM

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.

image

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.
image
image

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

You are breaking Cleverbot's terms of use

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)

Undefined

No matter what is inputted it returns undefined.

Language

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"]

Error: Response timeout of 5000ms exceeded.

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

Cleverbot Forbidden

(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])

[email protected] deprecation

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).

cleverbot-free not working / undefined

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.