feat(api): add model field and root endpoint
Add a model field to the gemini request mapping and implement a new root endpoint that returns a plain text status message.
This commit is contained in:
@@ -118,6 +118,7 @@ export async function mapRequest(body: RequestBody) {
|
||||
|
||||
return {
|
||||
geminiReq: {
|
||||
model: body.model,
|
||||
contents,
|
||||
generationConfig,
|
||||
stream: body.stream,
|
||||
|
||||
@@ -24,7 +24,7 @@ if (VERBOSE) {
|
||||
consola.info('Verbose logging enabled');
|
||||
}
|
||||
|
||||
consola.info('Google CLI OpenAI proxy');
|
||||
consola.info('Google CLI OpenAI API');
|
||||
|
||||
// ==================================================================
|
||||
// HTTP Server Helpers
|
||||
@@ -101,6 +101,12 @@ ensureOAuthCredentials()
|
||||
return;
|
||||
}
|
||||
|
||||
if (pathname === '/') {
|
||||
res.writeHead(200, { 'Content-Type': 'text/plain' });
|
||||
res.end('Google CLI OpenAI API server is running......');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isAuthorized(req, res)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user