premai-io / prem-gateway Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Last step, Create GitHub Release, in release GHA fails.
The goal is to develop a platform that integrates with an existing system to safeguard running services by enforcing users to provide a valid API key. The UI/UX should draw inspiration from the ChatGPT API Key Management platform, focusing on credit-based payments without a subscription option.
prem-app
as an admin dashboard. In this role, they should be able to create API keys (e.g., without constraints), view usage, etc.prem-app
dashboard.prem-app
) should be enhanced to enable the admin to create API keys and view Billing/Usage analytics.prem-service
based on API Key constraints which include:
prem-service
using the API key. The platform checks if the API key exists, whether the related user has enough balance, and whether the rate and usage limits for the desired service path are adhered to.In the installer script, we may ideally want to ask the user if he wants to enable or not basic auth.
I am using Prem Gateway with daemon and app together locally, I notice that when trying to proxy the service it does not use the right published docker port, as I get Gateway Timeout
when visiting http://localhost/all-minilm-l6-v2/docs
for example
With the latest main branch of prem-app do the following
docker-compose -f docker-compose.gateway.yml pull
docker-compose -f docker-compose.gateway.yml up -d --build
Then visit http://localhost with the browser and starts All MiniLM L6 v2
service via UI
192.168.65.1 - - [07/Nov/2023:17:46:29 +0000] "GET /all-minilm-l6-v2/docs HTTP/1.1" 504 15 "-" "-" 126 "all-minilm-l6-v2@docker" "http://172.17.0.3:8000" 30011ms
8444
INFO: Started server process [8]
INFO: Waiting for application startup.
2023-11-07 17:45:42 INFO Load pretrained SentenceTransformer: all-MiniLM-L6-v2
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
it seems the password cannot parse a forward
slash. We should escape it?
time="2023-11-03T01:17:17Z" level=fatal msg="failed to create pgdb service: cannot parse `postgresql://root:xxxxxx@dnsd-db-pg:5432/dnsd-db?sslmode=disable`: failed to parse as URL (parse \"postgresql://root:DYyM4/bbNBY=@dnsd-db-pg:5432/dnsd-db?sslmode=disable\": invalid port \":DYyM4\" after host)"
Password is POSTGRES_PASSWORD=DYyM4/bbNBY=
Current app payload {“domain”:“prem.tiero.ai”}
Add a simple service that takes care to poll the versions.json
as the source of truth for the latest version of the services to be "stable".
The service should
Optionally we can pass an AUTO_UPDATE=all
|patch
|minor
|major
env var to automatically update to the latest version based on SemVer (it can be exported by the installer script of prem-box
after asking user)
In an on-premise setup is common to use services such as ngrok or Cloudflare tunnel to hide the origin-destination or not have to mess with the local firewall.
Using this currently prevents to have a correct mapping the manual DNS record, as we don't really own an A Record on our IP, but we simply run a cloudflare daemon that proxy requests to the machine .
Demo.PremAI.io
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.