Rename file, add missing fetch

This commit is contained in:
Cohee 2023-12-13 02:22:35 +02:00
parent 35c2f8bf66
commit 52de5869fe
3 changed files with 3 additions and 2 deletions

View File

@ -1622,7 +1622,7 @@ app.use('/api/serpapi', require('./src/endpoints/serpapi').router);
// The different text generation APIs
// Ooba/OpenAI text completions
app.use('/api/backends/ooba', require('./src/endpoints/backends/ooba').router);
app.use('/api/backends/text-completions', require('./src/endpoints/backends/text-completions').router);
const tavernUrl = new URL(
(cliArguments.ssl ? 'https://' : 'http://') +

View File

@ -1,4 +1,5 @@
const express = require('express');
const fetch = require('node-fetch').default;
const { jsonParser } = require('../../express-common');
const { TEXTGEN_TYPES } = require('../../constants');

View File

@ -349,7 +349,7 @@ function getImages(path) {
/**
* Pipe a fetch() response to an Express.js Response, including status code.
* @param {Response} from The Fetch API response to pipe from.
* @param {import('node-fetch').Response} from The fetch response to pipe from.
* @param {Express.Response} to The Express response to pipe to.
*/
function forwardFetchResponse(from, to) {