File tree Expand file tree Collapse file tree 3 files changed +22
-39
lines changed Expand file tree Collapse file tree 3 files changed +22
-39
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import {
23
23
Message
24
24
} from '@inference/chat_completion_unified/UnifiedRequest'
25
25
import { RequestBase } from '@_types/Base'
26
- import { float , long } from '@_types/Numeric'
26
+ import { float , integer , long } from '@_types/Numeric'
27
27
28
28
export interface RequestChatCompletionBase extends RequestBase {
29
29
/**
@@ -59,3 +59,22 @@ export interface RequestChatCompletionBase extends RequestBase {
59
59
*/
60
60
top_p ?: float
61
61
}
62
+
63
+ export class AdaptiveAllocations {
64
+ /**
65
+ * Turn on `adaptive_allocations`.
66
+ * @server_default false
67
+ */
68
+ enabled ?: boolean
69
+ /**
70
+ * The maximum number of allocations to scale to.
71
+ * If set, it must be greater than or equal to `min_number_of_allocations`.
72
+ */
73
+ max_number_of_allocations ?: integer
74
+ /**
75
+ * The minimum number of allocations to scale to.
76
+ * If set, it must be greater than or equal to 0.
77
+ * If not defined, the deployment scales to 0.
78
+ */
79
+ min_number_of_allocations ?: integer
80
+ }
Original file line number Diff line number Diff line change 17
17
* under the License.
18
18
*/
19
19
20
+ import { AdaptiveAllocations } from '@inference/_types/CommonTypes'
20
21
import { InferenceChunkingSettings } from '@inference/_types/Services'
21
22
import { RequestBase } from '@_types/Base'
22
23
import { Id } from '@_types/common'
@@ -95,25 +96,6 @@ export enum ServiceType {
95
96
elasticsearch
96
97
}
97
98
98
- export class AdaptiveAllocations {
99
- /**
100
- * Turn on `adaptive_allocations`.
101
- * @server_default false
102
- */
103
- enabled ?: boolean
104
- /**
105
- * The maximum number of allocations to scale to.
106
- * If set, it must be greater than or equal to `min_number_of_allocations`.
107
- */
108
- max_number_of_allocations ?: integer
109
- /**
110
- * The minimum number of allocations to scale to.
111
- * If set, it must be greater than or equal to 0.
112
- * If not defined, the deployment scales to 0.
113
- */
114
- min_number_of_allocations ?: integer
115
- }
116
-
117
99
export class ElasticsearchServiceSettings {
118
100
/**
119
101
* Adaptive allocations configuration details.
Original file line number Diff line number Diff line change 17
17
* under the License.
18
18
*/
19
19
20
+ import { AdaptiveAllocations } from '@inference/_types/CommonTypes'
20
21
import { InferenceChunkingSettings } from '@inference/_types/Services'
21
22
import { RequestBase } from '@_types/Base'
22
23
import { Id } from '@_types/common'
@@ -89,25 +90,6 @@ export enum ServiceType {
89
90
elser
90
91
}
91
92
92
- export class AdaptiveAllocations {
93
- /**
94
- * Turn on `adaptive_allocations`.
95
- * @server_default false
96
- */
97
- enabled ?: boolean
98
- /**
99
- * The maximum number of allocations to scale to.
100
- * If set, it must be greater than or equal to `min_number_of_allocations`.
101
- */
102
- max_number_of_allocations ?: integer
103
- /**
104
- * The minimum number of allocations to scale to.
105
- * If set, it must be greater than or equal to 0.
106
- * If not defined, the deployment scales to 0.
107
- */
108
- min_number_of_allocations ?: integer
109
- }
110
-
111
93
export class ElserServiceSettings {
112
94
/**
113
95
* Adaptive allocations configuration details.
You can’t perform that action at this time.
0 commit comments