Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the urvanov-syntax-highlighter domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/controll/public_html/wp-includes/functions.php on line 6114
ControllingTheInter.net – Tech News, Legal and Daily Blog

C# Discord bot for .NET 8.0

In order to get this to run on a non-dev runtime box, you’ll need to install multiple of not all of these runtimes located here: https://learn.microsoft.com/en-gb/cpp/windows/latest-supported-vc-redist?view=msvc-170
I think the 2005VCRuntime along with the 2015-2019VCRuntime got it working on my Server 2019 Core setup.

Here is a sample HTML5 socket webpage if you’d like to access it from a remote machine.

Getting IIS Express to listen on a network LAN IP with visual studio.

Normally my post arnt so short but this burned 45 minutes of my time as I struggled to get a native IIS express deployment from VS2022 to use a lan port for debugging remote connections.

Navigate to \RootProjectDirectory\.vs\{ProjectName}\config\applicationhost.config

Run Visual Studio as Administrator, this is critical.
Delete the file after backing it up, then while in Visual studio click Create Virtual Directory using a different port on HTTP then the one you wish to open on lan
Start the project, then Stop debugging. Once Stopped, confirm IIS is no longer running on the taskbar.

Open the newly generated applicationhost.config file within the config directory and add the new binding, mine existed on line 168.

<binding protocol=”http” bindingInformation=”*:44392:{PUT LAN IP HERE}” />

An example of the config will look like this

<sites>
<site name=”WebSite1″ id=”1″ serverAutoStart=”true”>
<application path=”/”>
<virtualDirectory path=”/” physicalPath=”%IIS_SITES_HOME%\WebSite1″ />
</application>
<bindings>
<binding protocol=”http” bindingInformation=”:8080:localhost” />
</bindings>
</site>
<site name=”ProjectName” id=”2″>
<application path=”/” applicationPool=”Clr4IntegratedAppPool”>
<virtualDirectory path=”/” physicalPath=”C:\Users\User\source\repos\ProjectName\ProjectName” />
</application>
<bindings>
<binding protocol=”http” bindingInformation=”*:44391:localhost” />
<binding protocol=”http” bindingInformation=”*:44392:192.168.0.199″ />
</bindings>
</site>
<siteDefaults>
<!– To enable logging, please change the below attribute “enabled” to “true” –>
<logFile logFormat=”W3C” directory=”%AppData%\Microsoft\IISExpressLogs” enabled=”false” />
<traceFailedRequestsLogging directory=”%AppData%\Microsoft” enabled=”false” maxLogFileSizeKB=”1024″ />
</siteDefaults>
<applicationDefaults applicationPool=”Clr4IntegratedAppPool” />
<virtualDirectoryDefaults allowSubDirConfig=”true” />
</sites>

Save, then click Start debug within VS. You may now HTTP from your other machine using the newly added port.

Using LLamaSharp with RAG.

So, The data appears to take 6x-7x the amount of space to archive into the SQLlite memory storage.

Clearing history with a Chatsession does not appear to work correctly so I swapped over to a stateless built which helped so long that the RAG only needs to be called once per question. If additional questions need to be asked on the same data then optimization can be added to speed things up.

I will node that the prompt I’m using to search on provided much better results then the format documented on hugging face oddly enough. “Assistant:” {Query} “User:” instead of “instruct”, “query”.

I also used a function to pull filler words to speed up and create a more reliable keyword function, but the LLM itself wasn’t too bad.

Ultimately, Ill have to stick with the statelessexecutor until I can validate that the ChatSession operates correctly. Once I call LLMSession.load(CleanSession), readding in the prompts appears to not work correctly. During debugging, upon the second add, the count of the ChatSession remained zero.