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

@ -27,7 +27,7 @@ export default function ModelMenu() {
const [menuOpen, setMenuOpen] = useState(false);
const { model, customModel } = useSelector((state) => state.submit);
const { models, modelMap, initial } = useSelector((state) => state.models);
const { trigger } = manualSWR(`http://localhost:3080/api/customGpts`, 'get', (res) => {
const { trigger } = manualSWR(`/api/customGpts`, 'get', (res) => {
const fetchedModels = res.map((modelItem) => ({
...modelItem,
name: modelItem.chatGptLabel