Skip to main content

LlmBaseUrl

Namespace: Meshmakers.Octo.MeshAdapter.Nodes.Transform

The rule for the baseUrl of the sealed providerEndpoint of the AiConfiguration LlmQuery@1 uses. The provider receives the API key, so the URL must be one the key may travel to: absolute, https (plain http only on a loopback address, for a local gateway during development), and without user info, query or fragment, which would either carry a second credential or be cut off when the endpoint path is appended.

public static class LlmBaseUrl

Inheritance Object → LlmBaseUrl

Remarks:

The rule of the https check is lifted from the LlmQuery prototype by Philipp Schwaab (LlmClientFactory.RequireHttpsForKeyedEndpoint). The node checks the value before its first request, so a wrong URL fails the node and no request is sent.

Methods​

Parse(String)​

The base URL as the node uses it, or null when none is set (null, empty or white space).

public static Uri Parse(string value)

Parameters​

value String

Returns​

Uri

Exceptions​

ArgumentException
The value is set and breaks the rule.

TryParse(String, out Uri, out String)​

The rule without the value: true with the URL (or null when none is set), or false with the rule the value breaks. The rule text never contains a part of the value, so a caller whose value may be a secret (a key pasted into the wrong field) can report it.

public static bool TryParse(string value, out Uri uri, out String rule)

Parameters​

value String

uri Uri

rule String

Returns​

Boolean