Skip to content

Commit

Permalink
Clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
crickman committed Oct 5, 2024
1 parent 06f0d27 commit 1b3ea75
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 289 deletions.
206 changes: 0 additions & 206 deletions dotnet/samples/Concepts/Agents/ChatCompletion_StreamingTermination.cs

This file was deleted.

71 changes: 0 additions & 71 deletions dotnet/samples/Concepts/Agents/OpenAIAssistant_DocSample.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ public abstract class BaseTest : TextWriter
/// </summary>
public BaseTest Console => this;

protected bool UseOpenAIConfig => this.ForceOpenAI || string.IsNullOrEmpty(TestConfiguration.AzureOpenAI?.Endpoint);
protected bool UseOpenAIConfig => this.ForceOpenAI || string.IsNullOrEmpty(TestConfiguration.AzureOpenAI.Endpoint);

protected string ApiKey =>
this.UseOpenAIConfig ?
TestConfiguration.OpenAI.ApiKey :
TestConfiguration.AzureOpenAI?.ApiKey ?? string.Empty;
TestConfiguration.AzureOpenAI.ApiKey;

protected string? Endpoint => UseOpenAIConfig ? null : TestConfiguration.AzureOpenAI?.Endpoint;
protected string? Endpoint => UseOpenAIConfig ? null : TestConfiguration.AzureOpenAI.Endpoint;

protected string Model =>
this.UseOpenAIConfig ?
TestConfiguration.OpenAI.ChatModelId :
TestConfiguration.AzureOpenAI?.ChatDeploymentName ?? string.Empty;
TestConfiguration.AzureOpenAI.ChatDeploymentName;

protected Kernel CreateKernelWithChatCompletion()
{
Expand All @@ -52,9 +52,9 @@ protected Kernel CreateKernelWithChatCompletion()
else
{
builder.AddAzureOpenAIChatCompletion(
TestConfiguration.AzureOpenAI?.ChatDeploymentName ?? string.Empty,
TestConfiguration.AzureOpenAI?.Endpoint ?? string.Empty,
TestConfiguration.AzureOpenAI?.ApiKey ?? string.Empty);
TestConfiguration.AzureOpenAI.ChatDeploymentName,
TestConfiguration.AzureOpenAI.Endpoint,
TestConfiguration.AzureOpenAI.ApiKey);
}

return builder.Build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ public static void Initialize(IConfigurationRoot configRoot)
s_instance = new TestConfiguration(configRoot);
}

public static AzureOpenAIConfig? AzureOpenAI => null;
public static AzureOpenAIConfig? AzureOpenAIImages => null;
public static AzureOpenAIEmbeddingsConfig? AzureOpenAIEmbeddings => null;
public static AzureAISearchConfig? AzureAISearch => null;

public static OllamaConfig Ollama => LoadSection<OllamaConfig>();
public static OpenAIConfig OpenAI => LoadSection<OpenAIConfig>();
public static OnnxConfig Onnx => LoadSection<OnnxConfig>();
public static AzureOpenAIConfig AzureOpenAI => LoadSection<AzureOpenAIConfig>();
public static AzureAIInferenceConfig AzureAIInference => LoadSection<AzureAIInferenceConfig>();
public static AzureOpenAIConfig AzureOpenAIImages => LoadSection<AzureOpenAIConfig>();
public static AzureOpenAIEmbeddingsConfig AzureOpenAIEmbeddings => LoadSection<AzureOpenAIEmbeddingsConfig>();
public static AzureAISearchConfig AzureAISearch => LoadSection<AzureAISearchConfig>();
public static QdrantConfig Qdrant => LoadSection<QdrantConfig>();
public static WeaviateConfig Weaviate => LoadSection<WeaviateConfig>();
public static KeyVaultConfig KeyVault => LoadSection<KeyVaultConfig>();
Expand Down

0 comments on commit 1b3ea75

Please sign in to comment.