Rooni commited on
Commit
2ffd947
·
verified ·
1 Parent(s): 01dae82

Update server.js

Browse files
Files changed (1) hide show
  1. server.js +1 -4
server.js CHANGED
@@ -1,12 +1,9 @@
1
  const express = require('express');
2
  const proxy = require('express-http-proxy');
3
  const app = express();
4
- const targetUrl = 'https://api.openai.com'; // OpenAI API endpoint
5
- const openai_key = process.env.OPENAI_KEY
6
  app.use('/', proxy(targetUrl, {
7
  proxyReqOptDecorator: (proxyReqOpts, srcReq) => {
8
- // Modify the request headers if necessary
9
- // proxyReqOpts.headers['Authorization'] = 'Bearer '+openai_key;
10
  return proxyReqOpts;
11
  },
12
  }));
 
1
  const express = require('express');
2
  const proxy = require('express-http-proxy');
3
  const app = express();
4
+ const targetUrl = 'https://platform.openai.com/playground';
 
5
  app.use('/', proxy(targetUrl, {
6
  proxyReqOptDecorator: (proxyReqOpts, srcReq) => {
 
 
7
  return proxyReqOpts;
8
  },
9
  }));