Skip to content

Commit 5be1c2d

Browse files
committed
Adds custom InferenceEndpointInfo class for JinaAI (#4391)
* Adds custom InferenceEndpointInfo class for JinaAI. * Format fix.
1 parent 73bb48a commit 5be1c2d

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

specification/inference/_types/Services.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
2121
import { integer } from '@_types/Numeric'
22-
import { TaskType } from '../_types/TaskType'
22+
import { TaskType, TaskTypeJinaAi } from '../_types/TaskType'
2323

2424
/**
2525
* Configuration options when storing the inference endpoint
@@ -57,6 +57,17 @@ export class InferenceEndpointInfo extends InferenceEndpoint {
5757
task_type: TaskType
5858
}
5959

60+
export class InferenceEndpointInfoJinaAi extends InferenceEndpoint {
61+
/**
62+
* The inference Id
63+
*/
64+
inference_id: string
65+
/**
66+
* The task type
67+
*/
68+
task_type: TaskTypeJinaAi
69+
}
70+
6071
/**
6172
* Chunking configuration object
6273
*/

specification/inference/_types/TaskType.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,8 @@ export enum TaskType {
2727
completion,
2828
chat_completion
2929
}
30+
31+
export enum TaskTypeJinaAi {
32+
text_embedding,
33+
rerank
34+
}

specification/inference/put_jinaai/PutJinaAiResponse.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
* under the License.
1818
*/
1919

20-
import { InferenceEndpointInfo } from '@inference/_types/Services'
20+
import { InferenceEndpointInfoJinaAi } from '@inference/_types/Services'
2121

2222
export class Response {
23-
body: InferenceEndpointInfo
23+
body: InferenceEndpointInfoJinaAi
2424
}

0 commit comments

Comments
 (0)