Skip to content

Commit

Permalink
WIP ollama wingman + adding conditional compilation for freeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
dvorka committed Mar 3, 2024
1 parent 6caf701 commit 1d349f1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/src/qt/main_window_presenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2119,7 +2119,7 @@ void MainWindowPresenter::slotRunWingmanFromDialog(bool showDialog)
}

// RUN Wingman
QString promptLabel{QString(tr("Wingman is talking to the GPT provider..."))};
QString promptLabel{QString(tr("Wingman is runnning inferences..."))};
this->wingmanDialog->setPromptsLabel(promptLabel);
statusBar->showInfo(promptLabel);

Expand Down Expand Up @@ -2160,7 +2160,7 @@ void MainWindowPresenter::slotRunWingmanFromDialog(bool showDialog)
while(!futureWatcher.isFinished() && progress < progressLimit) {
MF_DEBUG(
progress << "/" << progressLimit <<
" Wingman is talking to the GPT provider..." << endl
" Wingman is running inferences..." << endl
);
QApplication::processEvents();
QThread::msleep(progressStep); // portable sleep
Expand Down
4 changes: 3 additions & 1 deletion lib/lib.pro
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ win32{
QMAKE_CXXFLAGS += /MP

# DISABLED ccache as it causes compilation error:
# "C1090: PDB API call failed, error code '23'" when used
# "C1090: PDB API call failed, error code '23'" when used
# when used w/ MS VS compiler:
# !mfnoccache { QMAKE_CXX = ccache $$QMAKE_CXX }
} else {
Expand Down Expand Up @@ -121,6 +121,7 @@ SOURCES += \
src/mind/ai/llm/wingman.cpp \
src/mind/ai/llm/mock_wingman.cpp \
src/mind/ai/llm/openai_wingman.cpp \
src/mind/ai/llm/ollama_wingman.cpp \
src/mind/dikw/dikw_pyramid.cpp \
src/mind/dikw/filesystem_information.cpp \
src/mind/dikw/information.cpp \
Expand Down Expand Up @@ -232,6 +233,7 @@ HEADERS += \
src/mind/ai/llm/wingman.h \
src/mind/ai/llm/mock_wingman.h \
src/mind/ai/llm/openai_wingman.h \
src/mind/ai/llm/ollama_wingman.h \
src/mind/dikw/information.h \
src/model/eisenhower_matrix.h \
src/model/kanban.h \
Expand Down
3 changes: 2 additions & 1 deletion lib/src/config/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ namespace m8r {
enum WingmanLlmProviders {
WINGMAN_PROVIDER_NONE,
WINGMAN_PROVIDER_MOCK,
WINGMAN_PROVIDER_OPENAI
WINGMAN_PROVIDER_OPENAI,
WINGMAN_PROVIDER_OLLAMA
// TODO WINGMAN_PROVIDER_GOOGLE,
};

Expand Down
2 changes: 1 addition & 1 deletion lib/src/gear/string_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ static inline std::string &stringLeftTrim(std::string& s) {
s.begin(),
std::find_if(s.begin(),
s.end(),
#ifdef __APPLE__
#if defined(__APPLE__) || defined(__FreeBSD__)
[](int c) {return !std::isspace(c);})
#else
std::not1(std::ptr_fun<int, int>(isspace)))
Expand Down

0 comments on commit 1d349f1

Please sign in to comment.