-
Notifications
You must be signed in to change notification settings - Fork 2
feat: open router proxy #3
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, had some comments
@MichalKalita please add this in the PR description to automatically close the issue: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I like that you used FastifyProxy, it makes code really simple.
I left a couple of minor comments.
I added a readme with examples and a 10% fee. I hope all feedback was applied to the code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I noticed there are some unresolved comments or questions from Jiri M. If you’ve already addressed them, I’d suggest marking them as resolved.
@MichalKalita for reference: Apify writing style |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, good job 👍 Only two minor comments
Closes: https://github.com/apify/ai-team/issues/16
I created main part with proxy to Open Router.
It exists as actor in https://console.apify.com/actors/sxck9mShRCfmMOZ8S/source
It works simply, just make proxy for /api/v1 into open router servers. Stream response directly to request. And in the end read cost and call
Actor.charge
. Actors cannot have dynamic charge prices, so exist only one event with price $0.001 and real cost is made by count.