• Resolved jonesuk

    (@jonesuk)


    Hi How to set user limit users via dollars, queries and tokens so that one set of users could be based on dollars per month while a another set of users is based on just 10 queries only not monthly and another set of users is based on tokens daily.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hi @jonesuk,

    Have a look here: https://meowapps.com/ai-engine/api/

    The complex way is to use the filter mwai_ai_allowed, where you will handle this all by yourself. Through it, you can cover any case you like, but you’ll need to handle it entirely.

    The easy way is to use the mwai_stats_credits, where you can return the number of credits based on what you like. However, this it’s simplified, the type of credits is the one in the settings (either for the visitor or logged user). But I think you know that, somehow ??

    What I could do for you is to enhance the mwai_stats_credits filter. Instead of returning only the credits, it would also return the type. I will keep its current behavior if it’s only one value (in that case, it will be the credits), but if it’s an named-array with two values ([ ‘credits’ => x, ‘creditsType’: ‘queries/units/price’ ]), it will work too.

    Would that help? ??

    bizx

    (@bizx)

    I upgraded the OpenAI to stop getting errors… as it seems to agregate all anonymous users when it is working out the total credits used…
    If your usecase is that the web site is public facing, It will be good to limit by IP address and session and then display a customizable message?

    Plugin Author Jordy Meow

    (@tigroumeow)

    Hi,

    I upgraded the OpenAI to stop getting errors

    Yes, an OpenAI active account is required after the trial (I believe).

    it seems to agregate all anonymous users when it is working out the total credits used

    You mean on OpenAI side? OpenAI is just one account, so yeah, if you were on the trial, every queries that go to it counts. It’s not related to my “Limits” which are related to the usage made of OpenAI in your WordPress.

    If your usecase is that the web site is public facing, It will be good to limit by IP address and session and then display a customizable message?

    That’s what I do; limit by IP, a few queries a day, and customizable message (you can use HTML in it) that could send people to your Contact Form, for example.

    Thread Starter jonesuk

    (@jonesuk)

    Thanks @ bizx and Jordy

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to set user limit users via dollars, queries and tokens’ is closed to new replies.