Skip to content

Commit

Permalink
feat(AI Chat): Add authoring config param for whether chat gpt is ena…
Browse files Browse the repository at this point in the history
…bled
  • Loading branch information
geoffreykwan committed Apr 15, 2024
1 parent a1e038b commit c8ef190
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;

import org.apache.commons.lang3.StringUtils;
import org.json.JSONException;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -398,6 +399,7 @@ protected HashMap<String, Object> getAuthorProjectConfig(Authentication auth,
config.put("projectAssetURL", contextPath + "/api/author/project/asset/" + project.getId());
config.put("projectBaseURL", projectBaseURL);
config.put("previewProjectURL", contextPath + "/preview/unit/" + project.getId());
config.put("chatGptEnabled", !StringUtils.isEmpty(appProperties.getProperty("OPENAI_API_KEY")));
config.put("cRaterRequestURL", contextPath + "/api/c-rater");
config.put("importStepsURL",
contextPath + "/api/author/project/importSteps/" + project.getId());
Expand Down

0 comments on commit c8ef190

Please sign in to comment.