RandomInternetPreson / LucidWebSearch

A web search extension for Oobabooga's text-generation-webui (now with nougat)
GNU Affero General Public License v3.0
61 stars 6 forks source link

New server.py file second option #8

Open Bobbyjohnsonz opened 5 months ago

Bobbyjohnsonz commented 5 months ago

The launch script didn't work for me, renamed as suggested and backed up the old file, It opened a command prompt and it said to press any key then it closed and nothing happend.

Anyways wanted to contribute to this fine project because it is super amazing and btw great freaking work ! Tried others and it either plane didn't work due to requirements conflict or somehow the search methods/results where inaccurate (somehow the model is clearly not working properly with the results) !

This thing works ! And with lots of settings and features !

Ok here's my plan B workaround for you (especially if you want to see the window working)

All are minimized automatically (Windows only)


Script to run google in debug mode and also minimize it. Save as .ps1 file in notepad:


Launch Chrome with specified debugging port

Start-Process "C:\Program Files\Google\Chrome\Application\chrome.exe" -ArgumentList "--remote-debugging-port=9222" Start-Sleep -Seconds 2 # Give Chrome some time to launch properly

Attempt to minimize the Chrome window

$chromeProcesses = Get-Process chrome -ErrorAction SilentlyContinue foreach ($chrome in $chromeProcesses) { if ($chrome.MainWindowHandle -ne 0) { Add-Type @" using System; using System.Runtime.InteropServices; public class Win32 { [DllImport("user32.dll")] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); } "@

2 = Minimize the window

    [Win32]::ShowWindow($chrome.MainWindowHandle, 2)
    break # Assuming only one window needs to be minimized
}

}

Exit PowerShell script

exit


Script to launch this script along with start_windows.bat minimized (Save as .cmd file in notepad):


@echo off start /min "" "C:\path\to\text-generation-webui-main\start_windows.bat" start "" powershell.exe -ExecutionPolicy Bypass -File "C \Path\to\Powershell\Script\File\YourScriptFilename.ps1"


Right click on desktop or inside of the folder you want your shortcut, set location as your .cmd file


Optional, make a fun icon lol.

RandomInternetPreson commented 5 months ago

Hmm interesting strategy, I'll look into integrating your suggestion when I have some free time.

Also, thank you for your kind words <3 I made the extension for the very same reasons you mentioned, nothing seemed to be working.

And thanks for trying out the new script.py file and providing feedback!

Bobbyjohnsonz commented 5 months ago

Hmm interesting strategy, I'll look into integrating your suggestion when I have some free time.

Also, thank you for your kind words <3 I made the extension for the very same reasons you mentioned, nothing seemed to be working.

And thanks for trying out the new script.py file and providing feedback!

I'd be lying to you if I didn't say that ChatGPT 4 was led by my prompts and I was basically in the back seat lol.

I have 0 clue about what that minimize script even means for chrome and Powershell, but what I do know is that it works !

The one click to open everything and minimized with auto launch and listen running for host is pretty bad a__. Got the model set up too so that it's ready during startup.

Feeling more closer to complete setup !

Now all I need is an extension that works with chatting with files like gpt4all or anythingllm. Comparing documents would be the holy grail.

RandomInternetPreson commented 5 months ago

Check this guy's repo out: https://github.com/brucepro/Memoir/tree/development

They made a post on r/oobabooga yesterday

https://old.reddit.com/r/Oobabooga/comments/1auj5wg/memoir_development_branch_rag_support_added/

It a good RAG implementation that I found to work well. They are implementing a means of retrieving web information, I couldn't get that part to work unless I replaced their urlhandler.py file with this:

https://old.reddit.com/r/Oobabooga/comments/1auj5wg/memoir_development_branch_rag_support_added/kr6wmth/

Also...hey if it works it works!