题意:在后端调用 `openai-node` 还是在前端调用 `https`?
问题背景:
I have a web application by ReactJS and Nodejs. This application calls OpenAI APIs.
我有一个使用 ReactJS 和 Node.js 开发的 Web 应用程序。这个应用程序调用 OpenAI 的 API。
Previously, when a user launches a request in the frontend, we send a request to the endpoint in our backend, call createChatCompletion
of https://github.com/openai/openai-node in the backend, and returns the result to the frontend. Note that the server of our frontend and the server of our backend are separate and not in the same location; users are everywhere in the world.
之前,当用户在前端发起