mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 13:06:31 +00:00
read cdn yaml config from api
automate tensorrt model conversion in case of no existing one for user's gpu
This commit is contained in:
@@ -11,7 +11,7 @@ public interface IAzaionApi
|
||||
ApiCredentials Credentials { get; }
|
||||
User CurrentUser { get; }
|
||||
void UpdateOffsets(UserQueueOffsets offsets);
|
||||
Stream GetResource(string filename);
|
||||
Stream GetResource(string filename, string folder);
|
||||
}
|
||||
|
||||
public class AzaionApi(HttpClient client, ICache cache, ApiCredentials credentials, IHardwareService hardwareService) : IAzaionApi
|
||||
@@ -32,11 +32,11 @@ public class AzaionApi(HttpClient client, ICache cache, ApiCredentials credentia
|
||||
}
|
||||
}
|
||||
|
||||
public Stream GetResource(string filename)
|
||||
public Stream GetResource(string filename, string folder)
|
||||
{
|
||||
var hardware = cache.GetFromCache(SecurityConstants.HARDWARE_INFO_KEY, hardwareService.GetHardware);
|
||||
|
||||
var response = Send(new HttpRequestMessage(HttpMethod.Post, $"/resources/get/{credentials.Folder}")
|
||||
var response = Send(new HttpRequestMessage(HttpMethod.Post, $"/resources/get/{folder}")
|
||||
{
|
||||
Content = new StringContent(JsonConvert.SerializeObject(new { filename, credentials.Password, hardware }), Encoding.UTF8, APP_JSON)
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user