Skip to content

Conversation

jonathan-buttner
Copy link
Contributor

@jonathan-buttner jonathan-buttner commented Jan 28, 2025

This PR adds a few more fields that can be returned to the UI and cleans up a few things. It is a bug that the fields weren't included initially.

There are a few fields that should be switched to required or optional that I addressed as well.

@jonathan-buttner jonathan-buttner added >refactoring :ml Machine learning Team:ML Meta label for the ML team auto-backport Automatically create backport pull requests when merged v9.0.0 v8.18.0 labels Jan 28, 2025
new SettingsConfiguration.Builder(supportedTaskTypes).setDescription("")
.setLabel("HTTP Schema")
.setRequired(true)
.setRequired(false)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

() -> {
var configurationMap = new HashMap<String, SettingsConfiguration>();

configurationMap.put(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's optional for the v1 endpoints for cohere: https://docs.cohere.com/v1/reference/embed#request.body.model

It's required for v2 endpoints for cohere. We use v1 right now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

model
string
Required
Defaults to embed-english-v2.0

required but with a default? 🧐

"The name of the model to use for the inference task."
)
.setLabel("Model ID")
.setRequired(true)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required for both text embedding and rerank: https://api.jina.ai/redoc#tag/embeddings

);

configurationMap.put(
URL,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to expose the URL for users. This was meant to be an internal way to test. Although I know we've leveraged that to connect to other providers that adhere to the OpenAI spec. So If we want to keep this I can understand the argument for that. We should make it optional though. Let me know what you think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URL is configurable in the API so that it can be used with a LocalAI server https://www.elastic.co/search-labs/blog/localai-for-text-embeddings

It shouldn't be configurable in the UI though as it makes little sense to change this when creating up an OpenAI endpoint

@jonathan-buttner jonathan-buttner marked this pull request as ready for review January 29, 2025 17:06
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)

() -> {
var configurationMap = new HashMap<String, SettingsConfiguration>();

configurationMap.put(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

model
string
Required
Defaults to embed-english-v2.0

required but with a default? 🧐

Copy link
Member

@davidkyle davidkyle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

);

configurationMap.put(
URL,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URL is configurable in the API so that it can be used with a LocalAI server https://www.elastic.co/search-labs/blog/localai-for-text-embeddings

It shouldn't be configurable in the UI though as it makes little sense to change this when creating up an OpenAI endpoint

@jonathan-buttner jonathan-buttner merged commit 2a1b433 into elastic:main Jan 31, 2025
16 checks passed
@jonathan-buttner jonathan-buttner deleted the ml-inference-missing-config-fields branch January 31, 2025 13:56
jonathan-buttner added a commit to jonathan-buttner/elasticsearch that referenced this pull request Jan 31, 2025
…21103)

* Adding fields and making some optional

* Fixing tests
jonathan-buttner added a commit to jonathan-buttner/elasticsearch that referenced this pull request Jan 31, 2025
…21103)

* Adding fields and making some optional

* Fixing tests
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
9.0
8.18
8.x

jonathan-buttner added a commit to jonathan-buttner/elasticsearch that referenced this pull request Jan 31, 2025
…21103)

* Adding fields and making some optional

* Fixing tests
elasticsearchmachine pushed a commit that referenced this pull request Jan 31, 2025
…121403)

* Adding fields and making some optional

* Fixing tests
elasticsearchmachine pushed a commit that referenced this pull request Jan 31, 2025
…121402)

* Adding fields and making some optional

* Fixing tests
elasticsearchmachine pushed a commit that referenced this pull request Jan 31, 2025
…121401)

* Adding fields and making some optional

* Fixing tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged :ml Machine learning >refactoring Team:ML Meta label for the ML team v8.18.0 v8.19.0 v9.0.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants