File size: 754 Bytes
cca2c82
a00a692
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
namespace FoodHealthChecker.Models
{

    public class TemporaryConfig
    {
        public string AzureOpenAI_DeploymentName { get; set; }
        public string AzureOpenAI_Endpoint { get; set; }
        public string AzureOpenAI_ApiKey { get; set; }
        public string OpenAI_ModelId { get; set; }
        public string OpenAI_ApiKey { get; set; }

        public bool isAzureOpenAIConfigValid()
        {
            return !string.IsNullOrEmpty(AzureOpenAI_DeploymentName) && !string.IsNullOrEmpty(AzureOpenAI_ApiKey) && !string.IsNullOrEmpty(AzureOpenAI_Endpoint);
        }
        public bool isOpenAIConfigValid()
        {
            return !string.IsNullOrEmpty(OpenAI_ApiKey) && !string.IsNullOrEmpty(OpenAI_ModelId);
        }
    }
}