Merge pull request #1788 from satti-hari-krishna-reddy/nightly
feat: Detect local/self-hosted AI model availability during backend startup
This commit is contained in:
@@ -1135,6 +1135,8 @@ func handleInfo(resp http.ResponseWriter, request *http.Request) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
aiEnabled := os.Getenv("OPENAI_API_URL") != "" && os.Getenv("AI_MODEL") != ""
|
||||||
|
|
||||||
returnValue := shuffle.HandleInfo{
|
returnValue := shuffle.HandleInfo{
|
||||||
Success: true,
|
Success: true,
|
||||||
Username: userInfo.Username,
|
Username: userInfo.Username,
|
||||||
@@ -1159,6 +1161,7 @@ func handleInfo(resp http.ResponseWriter, request *http.Request) {
|
|||||||
ActiveApps: activatedAppIds,
|
ActiveApps: activatedAppIds,
|
||||||
Theme: userInfo.Theme,
|
Theme: userInfo.Theme,
|
||||||
OrgStatus: parsedStatus,
|
OrgStatus: parsedStatus,
|
||||||
|
AIEnabled: aiEnabled,
|
||||||
}
|
}
|
||||||
|
|
||||||
returnData, err := json.Marshal(returnValue)
|
returnData, err := json.Marshal(returnValue)
|
||||||
|
|||||||
Reference in New Issue
Block a user