Skip to content

Commit 88ab54d

Browse files
committed
Adds custom InferenceEndpointInfo class for JinaAI.
1 parent 7d45a33 commit 88ab54d

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

specification/inference/_types/Services.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
2121
import { integer } from '@_types/Numeric'
2222
import { TaskType } from '../_types/TaskType'
23+
import { TaskTypeJinaAi } from '../_types/TaskType'
2324

2425
/**
2526
* Configuration options when storing the inference endpoint
@@ -57,6 +58,17 @@ export class InferenceEndpointInfo extends InferenceEndpoint {
5758
task_type: TaskType
5859
}
5960

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

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,9 +17,9 @@
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 {
2323
/** @codegen_name endpoint_info */
24-
body: InferenceEndpointInfo
24+
body: InferenceEndpointInfoJinaAi
2525
}

0 commit comments

Comments
 (0)