mindforger icon indicating copy to clipboard operation
mindforger copied to clipboard

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

Open djsudduth opened this issue 5 months ago • 9 comments

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.

djsudduth avatar Feb 17 '24 17:02 djsudduth

@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.

dvorka avatar Feb 17 '24 18:02 dvorka

@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

djsudduth avatar Feb 17 '24 19:02 djsudduth

@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: !

dvorka avatar Feb 17 '24 19:02 dvorka

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

djsudduth avatar Feb 17 '24 20:02 djsudduth

@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:

  • Qt for Win does not have OpenSSL included.

Solution:

  • include OpenSSL DLLs to MindForger .exe path - there are two options:
    • next to mindforger.exe binary
    • in Windows/System32 directory
  • DLLs to be included:
    • qt < 5.12.4 (DLLs can be found in bin/ directory of OpenSSL folder)
      • libeay32.dll
      • ssleay32.dll
    • qt >= 5.12.4 (*)
      • libssl-1_1.dll
      • libcrypto-1_1.dll
      • capi.dll ... dependency of above libs (they need it)
      • dasync.dll ... dependency of above libs (they need it)
  • why?
    • it is known Qt 5.15.2 issue that it requires OpenSSL 1.1.1
      • https://wiki.qt.io/Qt_5.15.2_Known_Issues#:~:text=for%20Automation%205.15-,OpenSSL,libraries%20used%20by%20Qt%20Network
  • where to get DLLS?
    • get OpenSSL from Shining Light Productions
      • https://slproweb.com/products/Win32OpenSSL.html
      • choose Win64 OpenSSL v1.1.1w Light (EXE)
      • install it w/ .dll extraction to bin/ directory (not System32/)
    • copy all DLLs from above (*) to bin/ next to mindforger.exe

Installer:

  • mindforger-setup.iss:
[Files]
Source: "C:\Path\To\OpenSSL\bin\*.dll"; 
DestDir: "{app}\bin";

dvorka avatar Feb 17 '24 20:02 dvorka

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

  • https://github.com/dvorka/mindforger/releases/download/2.0.0/windows-installer-mindforger-2.0.1-20365ac5-qt5152.exe

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

dvorka avatar Feb 18 '24 16:02 dvorka

@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?

djsudduth avatar Feb 18 '24 17:02 djsudduth

@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!

dvorka avatar Feb 18 '24 18:02 dvorka

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!

djsudduth avatar Feb 18 '24 19:02 djsudduth