mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-03-12 23:29:06 +00:00
Resolved warnings regarding redundant switch arms (#302)
This commit is contained in:
parent
0c4b94c527
commit
ccac2b04ac
@ -15,19 +15,11 @@ public static class HostExtensions
|
|||||||
|
|
||||||
public static string BaseURL(this Host host) => host switch
|
public static string BaseURL(this Host host) => host switch
|
||||||
{
|
{
|
||||||
Host.LM_STUDIO => "/v1/",
|
|
||||||
Host.LLAMACPP => "/v1/",
|
|
||||||
Host.OLLAMA => "/v1/",
|
|
||||||
|
|
||||||
_ => "/v1/",
|
_ => "/v1/",
|
||||||
};
|
};
|
||||||
|
|
||||||
public static string ChatURL(this Host host) => host switch
|
public static string ChatURL(this Host host) => host switch
|
||||||
{
|
{
|
||||||
Host.LM_STUDIO => "chat/completions",
|
|
||||||
Host.LLAMACPP => "chat/completions",
|
|
||||||
Host.OLLAMA => "chat/completions",
|
|
||||||
|
|
||||||
_ => "chat/completions",
|
_ => "chat/completions",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ public static class RetrievalContentTypeExtensions
|
|||||||
ContentType.VIDEO => RetrievalContentType.NOT_SPECIFIED,
|
ContentType.VIDEO => RetrievalContentType.NOT_SPECIFIED,
|
||||||
|
|
||||||
ContentType.NONE => RetrievalContentType.NOT_SPECIFIED,
|
ContentType.NONE => RetrievalContentType.NOT_SPECIFIED,
|
||||||
ContentType.UNKNOWN => RetrievalContentType.UNKNOWN,
|
|
||||||
_ => RetrievalContentType.UNKNOWN,
|
_ => RetrievalContentType.UNKNOWN,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,6 @@ public class TemporaryChatService(ILogger<TemporaryChatService> logger, Settings
|
|||||||
WorkspaceStorageTemporaryMaintenancePolicy.DELETE_OLDER_THAN_180_DAYS => DateTime.UtcNow - lastWriteTime > TimeSpan.FromDays(180),
|
WorkspaceStorageTemporaryMaintenancePolicy.DELETE_OLDER_THAN_180_DAYS => DateTime.UtcNow - lastWriteTime > TimeSpan.FromDays(180),
|
||||||
WorkspaceStorageTemporaryMaintenancePolicy.DELETE_OLDER_THAN_365_DAYS => DateTime.UtcNow - lastWriteTime > TimeSpan.FromDays(365),
|
WorkspaceStorageTemporaryMaintenancePolicy.DELETE_OLDER_THAN_365_DAYS => DateTime.UtcNow - lastWriteTime > TimeSpan.FromDays(365),
|
||||||
|
|
||||||
WorkspaceStorageTemporaryMaintenancePolicy.NO_AUTOMATIC_MAINTENANCE => false,
|
|
||||||
_ => false,
|
_ => false,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user