Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to restore compatibility with Cleverbot's current interface #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

PapoutsoglouE
Copy link

Cleverbot now requires a cookie, and the url for the POST request is different. I copied most changes from a respective Python API (https://github.com/folz/cleverbot.py). Seems to work like this for now.

@@ -3,7 +3,7 @@ defmodule Cleverbot.Session do
A struct that holds the state of a cleverbot session consisting of
`session_id` and `history`.
"""
defstruct session_id: nil, history: []
defstruct session_id: "", history: ["", "", "", "", "", "", ""]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this now required? Does it not work with an empty list anymore?

@BlakeWilliams
Copy link
Owner

One question, but otherwise this looks great. Thanks for taking the time to fix it!

@PapoutsoglouE
Copy link
Author

You're right, it is not necessary, just residues from early experiments I forgot to remove! Empty list works just fine.

…()[]\/+=? caused Cleverbot to respond with DENIED.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants