[ML] Integrate with DeepSeek API#122218
Merged
prwhelan merged 17 commits intoelastic:mainfrom Mar 12, 2025
Merged
Conversation
Integrating for Chat Completion and Completion task types, both calling the chat completion API for DeepSeek.
Collaborator
|
Hi @prwhelan, I've created a changelog YAML for you. |
Collaborator
|
Pinging @elastic/ml-core (Team:ML) |
prwhelan
commented
Feb 25, 2025
...ticsearch/xpack/inference/external/request/deepseek/DeepSeekChatCompletionRequestEntity.java
Outdated
Show resolved
Hide resolved
...g/elasticsearch/xpack/inference/external/request/deepseek/DeepSeekChatCompletionRequest.java
Outdated
Show resolved
Hide resolved
...ticsearch/xpack/inference/external/request/deepseek/DeepSeekChatCompletionRequestEntity.java
Outdated
Show resolved
Hide resolved
| var validationException = new ValidationException(); | ||
|
|
||
| var model = extractRequiredString(serviceSettingsMap, MODEL_ID, ModelConfigurations.SERVICE_SETTINGS, validationException); | ||
| var uri = createOptionalUri( |
Contributor
There was a problem hiding this comment.
Do we want to allow users to set the URL in the create inference endpoint request? If this is only for testing, then I think we can allow the child classes to override a method to return it, or pass it in via the constructor. Then in the tests we can set it via a constructor or a setter or something.
Member
Author
There was a problem hiding this comment.
I really only left it exposed but optional because anyone can in theory run the model locally behind an OpenAI compatible endpoint and then call it that way.
I can remove it though if that's not something we want to support, I'm neutral towards it
...in/java/org/elasticsearch/xpack/inference/services/deepseek/DeepSeekChatCompletionModel.java
Show resolved
Hide resolved
...in/java/org/elasticsearch/xpack/inference/services/deepseek/DeepSeekChatCompletionModel.java
Show resolved
Hide resolved
jonathan-buttner
approved these changes
Mar 11, 2025
jonathan-buttner
approved these changes
Mar 11, 2025
albertzaharovits
pushed a commit
to albertzaharovits/elasticsearch
that referenced
this pull request
Mar 13, 2025
Integrating for Chat Completion and Completion task types, both calling the chat completion API for DeepSeek.
jfreden
pushed a commit
to jfreden/elasticsearch
that referenced
this pull request
Mar 13, 2025
Integrating for Chat Completion and Completion task types, both calling the chat completion API for DeepSeek.
prwhelan
added a commit
to prwhelan/elasticsearch
that referenced
this pull request
Mar 13, 2025
Integrating for Chat Completion and Completion task types, both calling the chat completion API for DeepSeek.
prwhelan
added a commit
that referenced
this pull request
Mar 13, 2025
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integrating for Chat Completion and Completion task types, both calling the chat completion API for DeepSeek.
Verified:
max_completion_tokensdoes not work, we need to map tomax_tokensnis benigntemperatureworkstool_choiceworksstricttools is benigntop_pworksstreamworks