Raised This Month: $32 Target: $400
 8% 

[ANY] CleverBot API Wrapper


Post New Thread Reply   
 
Thread Tools Display Modes
Author
headline
SourceMod Moderator
Join Date: Mar 2015
Plugin ID:
5510
Plugin Version:
Plugin Category:
Technical/Development
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    A super simple CleverBot wrapper
    Unapprover:
    Reason for Unapproving:
    no longer supported
    Old 02-01-2017 , 00:46   [ANY] CleverBot API Wrapper
    Reply With Quote #1

    [ANY] CleverBot API Wrapper
    About:
    Essentially I made this to learn about how I'd implement callbacks into my own natives, as a result we receive a simple wrapper with one native for using an online CleverBot. This was created in part to eliminate the disgusting Kv/CFG based chat bots, but will be expanded in the future. I intend for this project to start small

    This plugin supplies an API for SourceMod plugin development and doesn't inherently do anything on it's own.

    Usage:
    Read the readme on GitHub here.

    Dependencies:
    SteamWorks: Download here.
    Attached Files
    File Type: zip CleverBotAPI-master.zip (41.7 KB, 298 views)

    Last edited by headline; 07-06-2017 at 12:49.
    headline is offline
    404UserNotFound
    BANNED
    Join Date: Dec 2011
    Old 02-01-2017 , 21:51   Re: [ANY] CleverBot API Wrapper
    Reply With Quote #2

    Lol was this made because of my thread about my work with that old ass SourceBot plugin and trying to compress code, where someone suggested using Cleverbot?

    Me likey.

    EDIT: "free for < 5k queries per month"

    Nevermind, I'll just continue my work with the SourceBot plugin where there are no such limitations

    Last edited by 404UserNotFound; 02-01-2017 at 21:53.
    404UserNotFound is offline
    headline
    SourceMod Moderator
    Join Date: Mar 2015
    Old 02-01-2017 , 22:36   Re: [ANY] CleverBot API Wrapper
    Reply With Quote #3

    Quote:
    Originally Posted by abrandnewday View Post
    Lol was this made because of my thread about my work with that old ass SourceBot plugin and trying to compress code, where someone suggested using Cleverbot?

    Me likey.

    EDIT: "free for < 5k queries per month"

    Nevermind, I'll just continue my work with the SourceBot plugin where there are no such limitations
    If you want more, their prices are fairly cheap.

    Last edited by headline; 02-01-2017 at 22:51.
    headline is offline
    headline
    SourceMod Moderator
    Join Date: Mar 2015
    Old 02-02-2017 , 23:19   Re: [ANY] CleverBot API Wrapper
    Reply With Quote #4

    Huge Update! We're also now on cleverbot.com's list of available API Wrappers! Read the new readme for updated documentation!

    Code:
    Version 1.1
    Added support for conversation IDs
    Added ArrayList implementation for chat history
    Fixed bug where multi-word queries would fail
    Added wrapper identification as requested by cleverbot.com
    Fixed include error
    Improved documentation
    Updated README docs
    Added missing JSON include

    Last edited by headline; 02-02-2017 at 23:20.
    headline is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 02-02-2017 , 23:26   Re: [ANY] CleverBot API Wrapper
    Reply With Quote #5

    Quote:
    Originally Posted by Headline View Post
    Huge Update! We're also now on cleverbot.com's list of available API Wrappers!
    That's pretty cool. What happens if you go over the api limit?
    Mitchell is offline
    headline
    SourceMod Moderator
    Join Date: Mar 2015
    Old 02-03-2017 , 00:42   Re: [ANY] CleverBot API Wrapper
    Reply With Quote #6

    They'll message you asking to change your service plan, or you can just keep it free and wait.

    Edit: To be honest, 5k queries a month is pretty fair.

    Last edited by headline; 02-03-2017 at 00:48.
    headline is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 02-03-2017 , 00:57   Re: [ANY] CleverBot API Wrapper
    Reply With Quote #7

    Quote:
    Originally Posted by Headline View Post
    They'll message you asking to change your service plan, or you can just keep it free and wait.

    Edit: To be honest, 5k queries a month is pretty fair.
    Like will the request fail and send a message saying that you've hit the limit or something?
    Mitchell is offline
    headline
    SourceMod Moderator
    Join Date: Mar 2015
    Old 02-03-2017 , 01:01   Re: [ANY] CleverBot API Wrapper
    Reply With Quote #8

    Quote:
    Originally Posted by Mitchell View Post
    Like will the request fail and send a message saying that you've hit the limit or something?
    Yeah. I haven't yet created an error detection (next update), but copied from their website they will spit out these status codes. I just have to figure out an error handling system

    Code:
    401: unauthorised due to missing or invalid API key
    404: API not found
    413: request too large if you send a request over 8Kb
    502 or 504: unable to get reply from API server, please contact us
    503: too many requests from a single IP address or API key
    I presume it'd send you a 503.
    Right know it'll just print the error code in error logs and not call the fwd


    EDIT: Just added better error handling to Git
    Code:
    Version 1.2
    Implemented status codes in callback
    Created CleverBot_GetErrorLogString so devs can do their own error handling

    Last edited by headline; 02-03-2017 at 02:14.
    headline is offline
    Franc1sco
    Veteran Member
    Join Date: Oct 2010
    Location: Spain (Madrid)
    Old 02-03-2017 , 08:26   Re: [ANY] CleverBot API Wrapper
    Reply With Quote #9

    Nice! I request that a time ago. I love cleverbot because have multilanguage support (atleast here). I will do a plugin using this API. Thanks
    __________________
    Veteran Coder -> Activity channel
    Coding on CS2 and taking paid and free jobs.

    Contact: Steam, Telegram or discord ( franug ).

    You like my work? +Rep in my steam profile comments or donate.

    Franc1sco is offline
    Send a message via MSN to Franc1sco
    headline
    SourceMod Moderator
    Join Date: Mar 2015
    Old 02-03-2017 , 17:15   Re: [ANY] CleverBot API Wrapper
    Reply With Quote #10

    Quote:
    Originally Posted by Franc1sco View Post
    Nice! I request that a time ago. I love cleverbot because have multilanguage support (atleast here). I will do a plugin using this API. Thanks
    I know it does Spanish and some French, I'm not too sure about other languages.

    Last edited by headline; 02-04-2017 at 03:33.
    headline is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 16:41.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode