AI-Studio/app/MindWork AI Studio/Provider/SelfHosted/HostExtensions.cs
Peer Schütt b75d90b13f
Added vLLM support (#524)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
2025-08-10 16:26:25 +02:00

41 lines
894 B
C#

namespace AIStudio.Provider.SelfHosted;
public static class HostExtensions
{
public static string Name(this Host host) => host switch
{
Host.NONE => "None",
Host.LM_STUDIO => "LM Studio",
Host.LLAMACPP => "llama.cpp",
Host.OLLAMA => "ollama",
Host.VLLM => "vLLM",
_ => "Unknown",
};
public static string BaseURL(this Host host) => host switch
{
_ => "/v1/",
};
public static string ChatURL(this Host host) => host switch
{
_ => "chat/completions",
};
public static bool AreEmbeddingsSupported(this Host host)
{
switch (host)
{
case Host.LM_STUDIO:
case Host.OLLAMA:
case Host.VLLM:
return true;
default:
case Host.LLAMACPP:
return false;
}
}
}