Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

models error fixed #1308

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions gui/pages/Content/Models/ModelForm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {useEffect, useRef, useState} from "react";
import {removeTab, openNewTab, createInternalId, modelGetAuth, getUserClick} from "@/utils/utils";
import {removeTab, openNewTab, createInternalId, getUserClick} from "@/utils/utils";
import Image from "next/image";
import {fetchApiKey, storeModel, verifyEndPoint} from "@/pages/api/DashboardService";
import {BeatLoader, ClipLoader} from "react-spinners";
Expand Down Expand Up @@ -66,11 +66,9 @@ export default function ModelForm({internalId, getModels, sendModelData}){
{
const modelProviderId = response.data[0].id
verifyEndPoint(response.data[0].api_key, modelEndpoint, selectedModel).then((response) =>{
if(response.data.success) {
if(response.data.success)
storeModelDetails(modelProviderId)
getUserClick("Model Added Successfully",{'type': selectedModel})
}
else {
else{
toast.error("The Endpoint is not Valid",{autoClose: 1800});
setIsLoading(false);
}
Expand Down
Loading