Add /v1/completions endpoint with OpenAI compatibility
docker-image / docker (push) Has been cancelled
goreleaser / goreleaser (push) Has been cancelled

- Implemented `/v1/completions` endpoint mirroring OpenAI's completions API specification.
- Added conversion functions to translate between completions and chat completions formats.
- Introduced streaming and non-streaming response handling for completions requests.
- Updated `server.go` to register the new endpoint and include it in the API's metadata.
This commit is contained in:
Luis Pater
2025-08-28 00:30:46 +08:00
parent 7a6adfa97e
commit bea5f97cbf
3 changed files with 449 additions and 1 deletions
+1 -1
View File
@@ -185,7 +185,7 @@ func (r *ModelRegistry) ClearModelQuotaExceeded(clientID, modelID string) {
if registration, exists := r.models[modelID]; exists {
delete(registration.QuotaExceededClients, clientID)
log.Debugf("Cleared quota exceeded status for model %s and client %s", modelID, clientID)
// log.Debugf("Cleared quota exceeded status for model %s and client %s", modelID, clientID)
}
}