Skip to content

Commit 5aff230

Browse files
Adding url configuration field
1 parent 9956bed commit 5aff230

File tree

1 file changed

+14
-0
lines changed
  • x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/openai

1 file changed

+14
-0
lines changed

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/openai/OpenAiService.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
import static org.elasticsearch.xpack.inference.external.action.ActionUtils.constructFailedToSendRequestMessage;
6161
import static org.elasticsearch.xpack.inference.services.ServiceFields.DIMENSIONS;
6262
import static org.elasticsearch.xpack.inference.services.ServiceFields.MODEL_ID;
63+
import static org.elasticsearch.xpack.inference.services.ServiceFields.URL;
6364
import static org.elasticsearch.xpack.inference.services.ServiceUtils.createInvalidModelException;
6465
import static org.elasticsearch.xpack.inference.services.ServiceUtils.parsePersistedConfigErrorMsg;
6566
import static org.elasticsearch.xpack.inference.services.ServiceUtils.removeFromMap;
@@ -418,6 +419,19 @@ public static InferenceServiceConfiguration get() {
418419
() -> {
419420
var configurationMap = new HashMap<String, SettingsConfiguration>();
420421

422+
configurationMap.put(
423+
URL,
424+
new SettingsConfiguration.Builder(SUPPORTED_TASK_TYPES_FOR_SERVICES_API).setDescription(
425+
"The absolute URL of the external service to send requests to."
426+
)
427+
.setLabel("URL")
428+
.setRequired(false)
429+
.setSensitive(false)
430+
.setUpdatable(false)
431+
.setType(SettingsConfigurationFieldType.STRING)
432+
.build()
433+
);
434+
421435
configurationMap.put(
422436
MODEL_ID,
423437
new SettingsConfiguration.Builder(SUPPORTED_TASK_TYPES_FOR_SERVICES_API).setDescription(

0 commit comments

Comments
 (0)