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

Avoid user requirement of providing their keys while controlling API costs #9

Open
syltruong opened this issue Jul 15, 2023 · 1 comment

Comments

@syltruong
Copy link
Contributor

Issue

Having to set up API keys (currently OpenAI, Twitter, Reddit) can be a barrier to acquiring users.

If we were to put the Media Agent in production, the experience needs to be as seamless as possible.

  • Reddit: free read-only service account API keys can be setup
  • Twitter: API costs
  • OpenAI pay as you go pricing

Are there alternatives/strategies in order to minimise/control cost?

@ahmedbesbes
Copy link
Owner

ahmedbesbes commented Jul 15, 2023

You can consider building Twitter and Reddit scrapers, but you open yourself to new problems: writing and scaling the scrapers, handling the security issues, etc. Plus, it won't be as efficient as consuming API endpoints.
Looking at the current open-source Twitter scrapers (e.g. Twint or twitter-scraper), they don't seem to work anymore after the recent updates made in the Twitter API.

As an alternative to OpenAI, we can provide the user with a way to set up a connexion with an open-source model, that we serve ourselves. I don't know if the results will be as good though.

Regarding OpenAI cost, we can control it by printing the running cost each time a response is displayed. However, computing the running cost doesn't work if the response messages are streamed from OpenAI. This limits the user experience a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants