API proxy for OpenAI using GitLab API key
Top 99.5% on sourcepulse
This project provides a proxy server for OpenAI's API, specifically designed to leverage GitLab API keys for authentication and authorization. It targets developers working with the fibjs framework, offering a development assistant that answers questions about fibjs based on its documentation. The primary benefit is enabling secure and controlled access to OpenAI's services using existing GitLab infrastructure.
How It Works
The server, built with fibjs, acts as an intermediary between clients and the OpenAI API. It intercepts requests, validates GitLab API keys via GitLab's API, and caches valid tokens. For chat completion requests containing "fibjs," it retrieves relevant documentation from a local SQLite database using embeddings generated by OpenAI's embedding API. This retrieved information is then prepended to the prompt sent to OpenAI, allowing the model to answer fibjs-specific questions contextually.
Quick Start & Requirements
fibjs
: fibjs server.js
cert.pem
and key.pem
for SSL.Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The project is described as a development assistant and may not be suitable for production environments without further hardening. The README does not detail error handling beyond basic status code checks, and the security implications of proxying API keys require careful consideration.
2 years ago
Inactive