fix: frontend api request shouldn't hard code the domain and port.

This commit is contained in:
Wentao Lyu 2023-03-10 21:06:13 +08:00
parent 06c99154ac
commit c5c865a25f
8 changed files with 11 additions and 11 deletions

View file

@ -11,7 +11,7 @@ export default function handleSubmit({
chatGptLabel,
promptPrefix
}) {
const endpoint = `http://localhost:3080/api/ask`;
const endpoint = `/api/ask`;
let payload = { model, text, chatGptLabel, promptPrefix };
if (convo.conversationId && convo.parentMessageId) {
payload = {