Skip to content

Commit

Permalink
Wingman brainstorm WIP.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvorka committed Nov 16, 2023
1 parent ed19f7a commit d0832c2
Show file tree
Hide file tree
Showing 5 changed files with 189 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/lib.pro
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ SOURCES += \
src/config/repository_configuration.cpp \
src/gear/async_utils.cpp \
src/gear/math_utils.cpp \
src/mind/ai/llm/mock_wingman.cpp \
src/mind/ai/llm/wingman.cpp \
src/mind/dikw/dikw_pyramid.cpp \
src/mind/dikw/filesystem_information.cpp \
src/mind/dikw/information.cpp \
Expand Down Expand Up @@ -225,6 +227,8 @@ HEADERS += \
./src/gear/math_utils.h \
./src/mind/dikw/dikw_pyramid.h \
./src/mind/dikw/filesystem_information.h \
src/mind/ai/llm/mock_wingman.h \
src/mind/ai/llm/wingman.h \
src/mind/dikw/information.h \
src/model/eisenhower_matrix.h \
src/model/kanban.h \
Expand Down
31 changes: 31 additions & 0 deletions lib/src/mind/ai/llm/mock_wingman.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
mock_wingman.cpp MindForger thinking notebook
Copyright (C) 2016-2023 Martin Dvorak <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "mock_wingman.h"

namespace m8r {

MockWingman::MockWingman()
{
}

MockWingman::~MockWingman()
{
}

} // m8r namespace
36 changes: 36 additions & 0 deletions lib/src/mind/ai/llm/mock_wingman.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
mock_wingman.h MindForger thinking notebook
Copyright (C) 2016-2023 Martin Dvorak <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef M8R_MOCK_WINGMAN_H
#define M8R_MOCK_WINGMAN_H

namespace m8r {

class MockWingman
{
public:
explicit MockWingman();
MockWingman(const MockWingman&) = delete;
MockWingman(const MockWingman&&) = delete;
MockWingman& operator =(const MockWingman&) = delete;
MockWingman& operator =(const MockWingman&&) = delete;
~MockWingman();
};

}
#endif // M8R_MOCK_WINGMAN_H
31 changes: 31 additions & 0 deletions lib/src/mind/ai/llm/wingman.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
wingman.cpp MindForger thinking notebook
Copyright (C) 2016-2023 Martin Dvorak <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "wingman.h"

namespace m8r {

Wingman::Wingman()
{
}

Wingman::~Wingman()
{
}

} // m8r namespace
87 changes: 87 additions & 0 deletions lib/src/mind/ai/llm/wingman.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/*
wingman.h MindForger thinking notebook
Copyright (C) 2016-2023 Martin Dvorak <[email protected]>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef M8R_WINGMAN_H
#define M8R_WINGMAN_H

#include <string>

namespace m8r {

class Wingman
{
public:
explicit Wingman();
Wingman(const Wingman&) = delete;
Wingman(const Wingman&&) = delete;
Wingman& operator =(const Wingman&) = delete;
Wingman& operator =(const Wingman&&) = delete;
~Wingman();

// Set LLM provider: chatGPT, h2oGPT(e), HF, ... - arg w/ interface > implementation
void setLlmProvider();

// use cases
void ask(std::string question);
void ask(std::string question, std::string context);
void ask(std::string question, std::string context, std::string style);
void ask(std::string question, std::string context, std::string style, std::string domain);
// ...

void explain(std::string term);

void fix_grammar(std::string grammar);
void fix_spelling(std::string spelling);
void fix_style(std::string style);

void translate(std::string text);

void summarize(std::string text);

void beautify(std::string text);
void beautify(std::string text, std::string style);
void beautify(std::string text, std::string style, std::string domain);
void beautify(std::string text, std::string style, std::string domain, std::string topic);
// ...

void simplify(std::string text);
void simplify(std::string text, std::string style);
void simplify(std::string text, std::string style, std::string domain);
// ...

void generate(std::string text);
void generate(std::string text, std::string context);
void generate(std::string text, std::string context, std::string style);
void generate(std::string text, std::string context, std::string style, std::string domain);
void generate(std::string text, std::string context, std::string style, std::string domain, std::string topic);
void generate(std::string text, std::string context, std::string style, std::string domain, std::string topic, std::string author);
void generate(std::string text, std::string context, std::string style, std::string domain, std::string topic, std::string author, std::string emotion);
void generate(std::string text, std::string context, std::string style, std::string domain, std::string topic, std::string author, std::string emotion, std::string intent);
void generate(std::string text, std::string context, std::string style, std::string domain, std::string topic, std::string author, std::string emotion, std::string intent, std::string audience);
void generate(std::string text, std::string context, std::string style, std::string domain, std::string topic, std::string author, std::string emotion, std::string intent, std::string audience, std::string purpose);

// other use cases
void fix_source(std::string source);
void fix_bug(std::string bug);
void create_plan(std::string plan);


};

}
#endif // M8R_WINGMAN_H

0 comments on commit d0832c2

Please sign in to comment.