Skip to content

Commit

Permalink
Merge pull request #1138 from Ontotext-AD/GDB-9132-Talk-to-Your-Graph…
Browse files Browse the repository at this point in the history
…-user-interface-fails-to-read-graphdb-external-url

GDB-9132 "Talk to Your Graph" user interface fails to read graphdb.external-url
  • Loading branch information
MartinaDimova authored Nov 15, 2023
2 parents 25e3982 + 2ebb52a commit 9f013f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/js/angular/chatgpt/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ angular

ChatGptCtrl.$inject = ['$scope', '$http', '$timeout', '$translate', '$uibModal', '$repositories', 'toastr', 'ModalService', 'LocalStorageAdapter'];

const CHATGPTRETRIEVAL_ENDPOINT = 'rest/chat/retrieval';

function ChatGptCtrl($scope, $http, $timeout, $translate, $uibModal, $repositories, toastr, ModalService, LocalStorageAdapter) {
function scrollToEnd() {
$timeout(() => {
Expand Down Expand Up @@ -82,7 +84,7 @@ function ChatGptCtrl($scope, $http, $timeout, $translate, $uibModal, $repositori

const questionMsg = {"role": "question", "content": $scope.question};

$http.post(`/rest/chat/retrieval?repositoryID=${$repositories.getActiveRepository()}`, chatRequest).then((response) => {
$http.post(`${CHATGPTRETRIEVAL_ENDPOINT}?repositoryID=${$repositories.getActiveRepository()}`, chatRequest).then((response) => {
$scope.history.pop();
response.data.forEach((e) => $scope.history.push(e));
}).catch((error) => {
Expand Down

0 comments on commit 9f013f4

Please sign in to comment.