Skip to content

Commit 42b4977

Browse files
Update Inference specification for Mistral's completion and chat completion tasks (#4464)
* Enhance Mistral integration: update model documentation and expand task types * Enhance Mistral integration: update task types and improve documentation * Update json schema --------- Co-authored-by: Quentin Pradet <quentin.pradet@elastic.co>
1 parent 8d7d457 commit 42b4977

File tree

7 files changed

+63
-40
lines changed

7 files changed

+63
-40
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 9 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/openapi/elasticsearch-serverless-openapi.json

Lines changed: 9 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 34 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/inference/_types/CommonTypes.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ export class MistralServiceSettings {
999999
max_input_tokens?: integer
10001000
/**
10011001
* The name of the model to use for the inference task.
1002-
* Refer to the Mistral models documentation for the list of available text embedding models.
1002+
* Refer to the Mistral models documentation for the list of available models.
10031003
* @ext_doc_id mistral-api-models
10041004
*/
10051005
model: string
@@ -1011,7 +1011,9 @@ export class MistralServiceSettings {
10111011
}
10121012

10131013
export enum MistralTaskType {
1014-
text_embedding
1014+
text_embedding,
1015+
completion,
1016+
chat_completion
10151017
}
10161018

10171019
export enum MistralServiceType {

specification/inference/_types/TaskType.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ export enum TaskTypeHuggingFace {
9090
}
9191

9292
export enum TaskTypeMistral {
93-
text_embedding
93+
text_embedding,
94+
chat_completion,
95+
completion
9496
}
9597

9698
export enum TaskTypeOpenAI {

specification/inference/put_mistral/PutMistralRequest.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { InferenceChunkingSettings } from '@inference/_types/Services'
2929
/**
3030
* Create a Mistral inference endpoint.
3131
*
32-
* Creates an inference endpoint to perform an inference task with the `mistral` service.
32+
* Create an inference endpoint to perform an inference task with the `mistral` service.
3333
* @rest_spec_name inference.put_mistral
3434
* @availability stack since=8.15.0 stability=stable visibility=public
3535
* @availability serverless stability=stable visibility=public
@@ -45,8 +45,7 @@ export interface Request extends RequestBase {
4545
]
4646
path_parts: {
4747
/**
48-
* The task type.
49-
* The only valid task type for the model to perform is `text_embedding`.
48+
* The type of the inference task that the model will perform.
5049
*/
5150
task_type: MistralTaskType
5251
/**

0 commit comments

Comments
 (0)