com.microsoft.semantickernel.services.AIServiceSelection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of semantickernel-api Show documentation
Show all versions of semantickernel-api Show documentation
Defines the public interface for the Semantic Kernel
// Copyright (c) Microsoft. All rights reserved.
package com.microsoft.semantickernel.services;
import com.microsoft.semantickernel.orchestration.PromptExecutionSettings;
import javax.annotation.Nullable;
/**
* The result of an AI service selection.
*
* @param The type of AI service.
*/
public class AIServiceSelection {
private final T service;
@Nullable
private final PromptExecutionSettings settings;
/**
* Creates a new AI service selection.
*
* @param service The selected AI service.
* @param settings The settings associated with the selected service. This may be {@code null}
* even if a service is selected..
*/
public AIServiceSelection(T service, @Nullable PromptExecutionSettings settings) {
this.service = service;
this.settings = settings;
}
/**
* Gets the selected AI service.
*
* @return The selected AI service.
*/
public T getService() {
return service;
}
/**
* Gets the settings associated with the selected service.
*
* @return The settings associated with the selected service. This may be {@code null} even if a
* service is selected.
*/
@Nullable
public PromptExecutionSettings getSettings() {
return settings;
}
}