Skip to content

Adds custom InferenceEndpointInfo classes #4444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 5, 2025

Conversation

kosabogi
Copy link
Contributor

@kosabogi kosabogi commented Jun 3, 2025

Context

The Response Attributes section of the reference documentation currently displays the task_types defined in the TaskType enum used by the InferenceEndpointInfo class. However, InferenceEndpointInfo is not specific to any particular inference API integration — it lists all available task types, not just those relevant to the specific integration being documented.

This PR introduces a new TaskType enums that includes only the relevant task types and references it in the newly added TaskType classes.

Related issue

https://github.com/elastic/developer-docs-team/issues/291

Copy link
Contributor

github-actions bot commented Jun 3, 2025

Following you can find the validation results for the APIs you have changed.

API Status Request Response
inference.chat_completion_unified Missing test Missing test
inference.completion Missing test Missing test
inference.delete Missing test Missing test
inference.get 🟢 1/1 1/1
inference.inference Missing test Missing test
inference.put_alibabacloud Missing test Missing test
inference.put_amazonbedrock Missing test Missing test
inference.put_anthropic Missing test Missing test
inference.put_azureaistudio Missing test Missing test
inference.put_azureopenai Missing test Missing test
inference.put_cohere Missing test Missing test
inference.put_elasticsearch Missing test Missing test
inference.put_elser Missing test Missing test
inference.put_googleaistudio Missing test Missing test
inference.put_googlevertexai Missing test Missing test
inference.put_hugging_face Missing test Missing test
inference.put_jinaai Missing test Missing test
inference.put_mistral Missing test Missing test
inference.put_openai Missing test Missing test
inference.put_voyageai Missing test Missing test
inference.put_watsonx Missing test Missing test
inference.put Missing test Missing test
inference.rerank Missing test Missing test
inference.sparse_embedding Missing test Missing test
inference.stream_completion Missing test Missing test
inference.text_embedding Missing test Missing test
inference.update Missing test Missing test

You can validate these APIs yourself by using the make validate target.

Copy link
Contributor

github-actions bot commented Jun 3, 2025

Following you can find the validation results for the APIs you have changed.

API Status Request Response
inference.chat_completion_unified Missing test Missing test
inference.completion Missing test Missing test
inference.delete Missing test Missing test
inference.get 🟢 1/1 1/1
inference.inference Missing test Missing test
inference.put_alibabacloud Missing test Missing test
inference.put_amazonbedrock Missing test Missing test
inference.put_anthropic Missing test Missing test
inference.put_azureaistudio Missing test Missing test
inference.put_azureopenai Missing test Missing test
inference.put_cohere Missing test Missing test
inference.put_elasticsearch Missing test Missing test
inference.put_elser Missing test Missing test
inference.put_googleaistudio Missing test Missing test
inference.put_googlevertexai Missing test Missing test
inference.put_hugging_face Missing test Missing test
inference.put_jinaai Missing test Missing test
inference.put_mistral Missing test Missing test
inference.put_openai Missing test Missing test
inference.put_voyageai Missing test Missing test
inference.put_watsonx Missing test Missing test
inference.put Missing test Missing test
inference.rerank Missing test Missing test
inference.sparse_embedding Missing test Missing test
inference.stream_completion Missing test Missing test
inference.text_embedding Missing test Missing test
inference.update Missing test Missing test

You can validate these APIs yourself by using the make validate target.

@kosabogi kosabogi requested a review from l-trotta June 3, 2025 13:14
Copy link
Contributor

@szabosteve szabosteve left a comment

Choose a reason for hiding this comment

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

Awesome, thank you for doing this! LGTM!

Copy link
Contributor

@l-trotta l-trotta left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for all the changes!

Copy link
Contributor

github-actions bot commented Jun 5, 2025

Following you can find the validation results for the APIs you have changed.

API Status Request Response
inference.chat_completion_unified Missing test Missing test
inference.completion Missing test Missing test
inference.delete Missing test Missing test
inference.get 🟢 1/1 1/1
inference.inference Missing test Missing test
inference.put_alibabacloud Missing test Missing test
inference.put_amazonbedrock Missing test Missing test
inference.put_anthropic Missing test Missing test
inference.put_azureaistudio Missing test Missing test
inference.put_azureopenai Missing test Missing test
inference.put_cohere Missing test Missing test
inference.put_elasticsearch Missing test Missing test
inference.put_elser Missing test Missing test
inference.put_googleaistudio Missing test Missing test
inference.put_googlevertexai Missing test Missing test
inference.put_hugging_face Missing test Missing test
inference.put_jinaai Missing test Missing test
inference.put_mistral Missing test Missing test
inference.put_openai Missing test Missing test
inference.put_voyageai Missing test Missing test
inference.put_watsonx Missing test Missing test
inference.put Missing test Missing test
inference.rerank Missing test Missing test
inference.sparse_embedding Missing test Missing test
inference.stream_completion Missing test Missing test
inference.text_embedding Missing test Missing test
inference.update Missing test Missing test

You can validate these APIs yourself by using the make validate target.

Copy link
Contributor

github-actions bot commented Jun 5, 2025

Following you can find the validation results for the APIs you have changed.

API Status Request Response
inference.chat_completion_unified Missing test Missing test
inference.completion Missing test Missing test
inference.delete Missing test Missing test
inference.get 🟢 1/1 1/1
inference.inference Missing test Missing test
inference.put_alibabacloud Missing test Missing test
inference.put_amazonbedrock Missing test Missing test
inference.put_anthropic Missing test Missing test
inference.put_azureaistudio Missing test Missing test
inference.put_azureopenai Missing test Missing test
inference.put_cohere Missing test Missing test
inference.put_elasticsearch Missing test Missing test
inference.put_elser Missing test Missing test
inference.put_googleaistudio Missing test Missing test
inference.put_googlevertexai Missing test Missing test
inference.put_hugging_face Missing test Missing test
inference.put_jinaai Missing test Missing test
inference.put_mistral Missing test Missing test
inference.put_openai Missing test Missing test
inference.put_voyageai Missing test Missing test
inference.put_watsonx Missing test Missing test
inference.put Missing test Missing test
inference.rerank Missing test Missing test
inference.sparse_embedding Missing test Missing test
inference.stream_completion Missing test Missing test
inference.text_embedding Missing test Missing test
inference.update Missing test Missing test

You can validate these APIs yourself by using the make validate target.

@kosabogi kosabogi merged commit 6baef2f into main Jun 5, 2025
8 checks passed
@kosabogi kosabogi deleted the inference-service-task-types branch June 5, 2025 06:26
Copy link
Contributor

github-actions bot commented Jun 5, 2025

The backport to 8.19 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.19 8.19
# Navigate to the new working tree
cd .worktrees/backport-8.19
# Create a new branch
git switch --create backport-4444-to-8.19
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 6baef2fa4a7022b8f6c51cd0e7c67527cd5be91f
# Push it to GitHub
git push --set-upstream origin backport-4444-to-8.19
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.19

Then, create a pull request where the base branch is 8.19 and the compare/head branch is backport-4444-to-8.19.

Copy link
Contributor

github-actions bot commented Jun 5, 2025

The backport to 8.18 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.18 8.18
# Navigate to the new working tree
cd .worktrees/backport-8.18
# Create a new branch
git switch --create backport-4444-to-8.18
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 6baef2fa4a7022b8f6c51cd0e7c67527cd5be91f
# Push it to GitHub
git push --set-upstream origin backport-4444-to-8.18
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.18

Then, create a pull request where the base branch is 8.18 and the compare/head branch is backport-4444-to-8.18.

Copy link
Contributor

github-actions bot commented Jun 5, 2025

The backport to 9.0 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-9.0 9.0
# Navigate to the new working tree
cd .worktrees/backport-9.0
# Create a new branch
git switch --create backport-4444-to-9.0
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 6baef2fa4a7022b8f6c51cd0e7c67527cd5be91f
# Push it to GitHub
git push --set-upstream origin backport-4444-to-9.0
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-9.0

Then, create a pull request where the base branch is 9.0 and the compare/head branch is backport-4444-to-9.0.

kosabogi added a commit that referenced this pull request Jun 5, 2025
* Adds custom InferenceEndpointInfo classes

* Code style fix

* Code style fix

(cherry picked from commit 6baef2f)
kosabogi added a commit that referenced this pull request Jun 5, 2025
* Adds custom InferenceEndpointInfo classes

* Code style fix

* Code style fix

(cherry picked from commit 6baef2f)
@kosabogi
Copy link
Contributor Author

kosabogi commented Jun 5, 2025

I've created the backports manually for the 8.18, 8.19, and 9.0 branches:

  • 8.19 – ✅ Merged
  • 8.18 and 9.0 – ❌ The Validate API job is currently failing. This Node.js upgrade should fix it soon, and the backports will pass.

pquentin added a commit that referenced this pull request Jun 6, 2025
* Adds custom InferenceEndpointInfo classes

* Code style fix

* Code style fix

(cherry picked from commit 6baef2f)

Co-authored-by: Quentin Pradet <quentin.pradet@elastic.co>
pquentin added a commit that referenced this pull request Jun 6, 2025
…4463)

* Adds custom InferenceEndpointInfo classes (#4444)

* Adds custom InferenceEndpointInfo classes

* Code style fix

* Code style fix

(cherry picked from commit 6baef2f)

* Fix code style in UnifiedRequest.ts

---------

Co-authored-by: Quentin Pradet <quentin.pradet@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants