Use ollama's OpenAI compatible API

This commit is contained in:
Thorsten Sommer 2024-07-16 10:15:54 +02:00
parent 52caf96cf4
commit 6153d9e691
No known key found for this signature in database
GPG Key ID: B0B7E2FC074BF1F5

View File

@ -26,7 +26,7 @@ public static class HostExtensions
{ {
Host.LM_STUDIO => "/v1/", Host.LM_STUDIO => "/v1/",
Host.LLAMACPP => "/v1/", Host.LLAMACPP => "/v1/",
Host.OLLAMA => "/api/", Host.OLLAMA => "/v1/",
_ => "/v1/", _ => "/v1/",
}; };
@ -35,7 +35,7 @@ public static class HostExtensions
{ {
Host.LM_STUDIO => "chat/completions", Host.LM_STUDIO => "chat/completions",
Host.LLAMACPP => "chat/completions", Host.LLAMACPP => "chat/completions",
Host.OLLAMA => "chat", Host.OLLAMA => "chat/completions",
_ => "chat/completions", _ => "chat/completions",
}; };