dvorka / mindforger

Thinking notebook and Markdown editor.
https://www.mindforger.com
GNU General Public License v2.0
2.27k stars 138 forks source link

[Bug] Can't get Wingman to work on Windows #1533

Closed djsudduth closed 8 months ago

djsudduth commented 8 months ago

Thank you @dvorka for the recent updates to mindforger 2.0!! Super exciting to see.

However, I can't seem to get Wingman to work for me. I'm using Windows 10 right now with my OpenAI key. I was able to confirm the key works with other tools. But, every time I run Wingman I get ERROR: Error: request to OpenAI Wingman provider failed due a network error - Error creating SSL context ()

Any ideas? I tried the new key and model with Logseq and it worked fine - no network error.

Also, any way to pick the LLM? I typically use gpt-4-turbo.

dvorka commented 8 months ago

@djsudduth apologies, I'm still releasing and adding distributions for various operating systems. Can you please try (better) Windows distribution which is based on Qt 5.15.2?

I just uploaded ^ to the MindForger 2.0.0 release page. Check that you Preferences look like in the screenshot below and OpenAI is chosen as LLM provider:

check

Also, any way to pick the LLM? I typically use gpt-4-turbo.

Unfortunately it is not possible to choose the model in MindForger 2.0.0, however, I will add it in the next release - it will be simple enhancement.

djsudduth commented 8 months ago

@dvorka - installed the update and confirmed the configuration. I now have a new error:

ERROR: Error: request to OpenAI Wingman provider failed due a network error - TLS initialization failed

dvorka commented 8 months ago

@djsudduth let me try to repro that on a Windows machine different from the one I use for MindForger development. Thank you for reporting the :lady_beetle: !

djsudduth commented 8 months ago

@dvorka - you probably knew this - but in case it helps: https://stackoverflow.com/questions/53805704/tls-initialization-failed-on-get-request

dvorka commented 8 months ago

@djsudduth thank you! :lady_beetle: is reproducible on non-development Windows machine. I didn't fix it there yet, but the most probable root cause is missing OpenSSL and/or version mismatch. I will need to find out how to include missing libraries in the installer.


Problem:

Solution:

Installer:

[Files]
Source: "C:\Path\To\OpenSSL\bin\*.dll"; 
DestDir: "{app}\bin";
dvorka commented 8 months ago

@djsudduth I think that I solved problem with OpenSSL on Windows - please try MindForger 2.0.1 (either link below or from the Releases):

As a small thank you for your help, I've added the ability to set your favorite OpenAI model using environment variable :wink:

# Windows
set MINDFORGER_OPENAI_LLM_MODEL=gpt-4

# Linux/macOS
export MINDFORGER_OPENAI_LLM_MODEL=gpt-4

Please give it a try!

special-thanks

djsudduth commented 8 months ago

@dvorka Fantastic!!! It works very well! I tried some variations on notes and no issues at all. Thank you for the effort to fix it and adding the LLM option!

Side question: were there any enhancements to the ML 'thinking' model for associations?

dvorka commented 8 months ago

@djsudduth :relieved:

were there any enhancements to the ML 'thinking' model for associations?

I did not improve associations in MindForger - it still uses a pretty simple algorithm that is not bad, but it also does not work sufficiently well.

General-purpose LLM integration (like OpenAI) is meant for use cases that assist in note-taking. Associations (semantic similarity search) and "talk to your notes" will be about a RAG-like solution.

I would like to improve associations and have some fun. My plan is to use word embeddings (I'm looking for a fast model to calculate them) and a quick similarity search like https://github.com/facebookresearch/faiss. The most challenging part will be implementing a fast, local (notes will not be sent anywhere), CPU-only solution that will use a reasonable amount of resources.

Anyway, I'm looking forward to it!

djsudduth commented 8 months ago

Yeah, faiss makes good sense to try. There are plenty of RAG solutions to choose from for vector store and retrieval. Looking forward to what you might come up with. Thanks!