Rename file, add missing fetch
This commit is contained in:
parent
35c2f8bf66
commit
52de5869fe
|
@ -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://') +
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const express = require('express');
|
||||
const fetch = require('node-fetch').default;
|
||||
|
||||
const { jsonParser } = require('../../express-common');
|
||||
const { TEXTGEN_TYPES } = require('../../constants');
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue