Skip to content

Commit

Permalink
[Inference API] Add AzureOpenAiCompletionServiceSettings and AzureOpe…
Browse files Browse the repository at this point in the history
…nAiCompletionTaskSettings to InferenceNamedWriteablesProvider (#108491)
  • Loading branch information
timgrein committed May 10, 2024
1 parent bc37ecf commit 0eae056
Showing 1 changed file with 17 additions and 0 deletions.
Expand Up @@ -26,6 +26,8 @@
import org.elasticsearch.xpack.core.inference.results.TextEmbeddingByteResults;
import org.elasticsearch.xpack.core.inference.results.TextEmbeddingResults;
import org.elasticsearch.xpack.inference.services.azureopenai.AzureOpenAiSecretSettings;
import org.elasticsearch.xpack.inference.services.azureopenai.completion.AzureOpenAiCompletionServiceSettings;
import org.elasticsearch.xpack.inference.services.azureopenai.completion.AzureOpenAiCompletionTaskSettings;
import org.elasticsearch.xpack.inference.services.azureopenai.embeddings.AzureOpenAiEmbeddingsServiceSettings;
import org.elasticsearch.xpack.inference.services.azureopenai.embeddings.AzureOpenAiEmbeddingsTaskSettings;
import org.elasticsearch.xpack.inference.services.cohere.CohereServiceSettings;
Expand Down Expand Up @@ -237,6 +239,21 @@ public static List<NamedWriteableRegistry.Entry> getNamedWriteables() {
)
);

namedWriteables.add(
new NamedWriteableRegistry.Entry(
ServiceSettings.class,
AzureOpenAiCompletionServiceSettings.NAME,
AzureOpenAiCompletionServiceSettings::new
)
);
namedWriteables.add(
new NamedWriteableRegistry.Entry(
TaskSettings.class,
AzureOpenAiCompletionTaskSettings.NAME,
AzureOpenAiCompletionTaskSettings::new
)
);

return namedWriteables;
}
}

0 comments on commit 0eae056

Please sign in to comment.