Replit.ai.modelfarm, Pro account, InvalidResponseException: Non-paying account

Problem description:
As announced in https://twitter.com/amasad/status/1702003510060228786 i should be able to run inference with few lines of code, without API keys and etc, available for free for Pro accounts, with code such as:

from replit.ai.modelfarm import CompletionModel

# Set the path to the trained model
def main():
  model = CompletionModel("text-bison")
  prompts = ["Hello", "How are you?", "What is your name?"]
  for prompt in prompts:
    print(prompt)
    print(model.complete(prompt))
    print()
         
if __name__ == "__main__":
    main()

Expected behavior:
Get completion

Actual behavior:

Traceback (most recent call last):
  File "main.py", line 15, in <module>
    main()
  File "main.py", line 9, in main
    print(model.complete(prompt))
  File "/home/runner/CloudyFrizzyIdentifier/.pythonlibs/lib/python3.10/site-packages/replit/ai/modelfarm/completion_model.py", line 51, in complete
    self._check_response(response)
  File "/home/runner/CloudyFrizzyIdentifier/.pythonlibs/lib/python3.10/site-packages/replit/ai/modelfarm/model.py", line 57, in _check_response
    raise InvalidResponseException(rjson["detail"])
replit.ai.modelfarm.exceptions.InvalidResponseException: Non-paying account.

Steps to reproduce:

Bug appears at this link:

Browser:
OS: Linux
Device (Android, iOS, n/a leave blank): PC
Plan (Free, Hacker, Pro Plan):
Pro

1 Like

Odd. It works for me on Hacker (only in the workspace of course with that code).
https://replit.com/@CoderElijah/AI

1 Like

Python version is not done yet.
Use the TS version, or maybe you could try and figure out how to make your own Wrapper.
The module API’s use Env. Vars. and stuff.

1 Like

I got it working with Python.

1 Like

Lucky, must be a bug then!

1 Like

Can you share the code please? Or it is the same?

Zero-days, amiright??

I used this but the code on blog.replit.com worked flawlessly too (I just improved it a little). It was in the link in my first post.

from replit.ai.modelfarm import CompletionModel

model = CompletionModel("text-bison")
print("Begin typing...\n***")
while True:
  prompts = [input("> ")]
  completion = model.complete(prompts, max_output_tokens=50, temperature=1)
  print("***\n" + completion.responses[0].choices[0].content + "\n***")
1 Like

Try what he did, and add more Params to complete.

1 Like

Nope, doesnt work for me:
“replit.ai.modelfarm.exceptions.InvalidResponseException: Non-paying account.”

Just rechecked, i have Pro badge (paid year). It’s sad i’m going to lose free days and ticking clock of paid account due bug :frowning:
Not sure if there is better way to share code/screenshot:

2 Likes

That is so weird. Especially since I’m technically not a paying account but you are (my Hacker is provided for my services here).

Hey, we’ve identified the issue. The fix should be up and running in ~20 minutes! I’ll post once we’ve fixed it. I’m sorry for the inconvenience.

3 Likes

Thanks!!

P.S. Wrapper docs when, lol??

1 Like

You can find docs here: https://docs.replit.com/ai/model-farm/

Let me know if there is anything missing and I’ll get it fixed up!

1 Like

Oh, no, I mean for the Web API and it’s endpoints.
Trying to make a wrapper in Oak so I can use Replit’s ModelFarm on a quicker lang!
Did the same with Replit DB and made it prod-worthy.

Just gotta do the extension API after, (which I believe also has no endpoint docs either.)

1 Like

Yay, works for me now, thanks!

1 Like

Oh that is awesome! We punted documenting the rest API for this initial release, but it’s on the roadmap. I’ll make sure to prioritize it and let you know when it’s done.

The source code for the python library is open-source, so you can take a look at that if you’d like: GitHub - replit/replit-ai-python: The library for Replit AI. The trickiest piece will be getting the auths, but it should be fairly easy to figure out from the code.

1 Like

Issue fixed, thanks for your patience!

2 Likes

Sounds good!
Thanks!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.