Skip to content

Commit 84d888d

Browse files
committed
Build reference errors fixed
1 parent ac7e1fe commit 84d888d

4 files changed

Lines changed: 10 additions & 4 deletions

File tree

apps/windows/cpp/ChatServer/ChatServer.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ ChatServer::~ChatServer()
8585

8686
void ChatServer::ChatLoop()
8787
{
88-
AppUtils::PromptHandler prompt_handler;
88+
// AppUtils::PromptHandler prompt_handler;
8989

9090
// Initiate Chat with infinite loop.
9191
// User to provide `exit` as a prompt to exit.
@@ -113,7 +113,8 @@ void ChatServer::ChatLoop()
113113
continue;
114114
}
115115

116-
std::string tagged_prompt = prompt_handler.GetPromptWithTag(user_prompt);
116+
// std::string tagged_prompt = prompt_handler.GetPromptWithTag(user_prompt);
117+
std::string tagged_prompt = user_prompt;
117118

118119
// Bot's response
119120
std::cout << "Output: ";
@@ -125,3 +126,7 @@ void ChatServer::ChatLoop()
125126
}
126127
}
127128
}
129+
130+
GenieDialog_Handle_t ChatServer::GetDialogHandle() const {
131+
return m_dialog_handle;
132+
}

apps/windows/cpp/ChatServer/ChatServer.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,6 @@ class ChatServer
4848
*
4949
*/
5050
void ChatLoop();
51+
GenieDialog_Handle_t GetDialogHandle() const;
5152
};
5253
} // namespace App

apps/windows/cpp/ChatServer/HttpServer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <iostream>
88
#include <sstream>
99
#include <json.hpp>
10-
#define CPPHTTPLIB_OPENSSL_SUPPORT
10+
// #define CPPHTTPLIB_OPENSSL_SUPPORT
1111
#include "httplib.h"
1212

1313
using json = nlohmann::json;
@@ -41,7 +41,7 @@ void HttpServer::Start() {
4141
std::string tagged_prompt = prompt_handler.FormatMessages(body["messages"]);
4242
std::string model_response;
4343
if (GENIE_STATUS_SUCCESS != GenieDialog_query(
44-
m_chat_server.m_dialog_handle, tagged_prompt.c_str(),
44+
m_chat_server.GetDialogHandle(), tagged_prompt.c_str(),
4545
GenieDialog_SentenceCode_t::GENIE_DIALOG_SENTENCE_COMPLETE,
4646
[](const char* response_back, const GenieDialog_SentenceCode_t, const void* user_data) {
4747
std::string* resp = static_cast<std::string*>(const_cast<void*>(user_data));

apps/windows/cpp/ChatServer/nlohmann/json.hpp

Whitespace-only changes.

0 commit comments

Comments
 (0)