Skip to content

Commit f414299

Browse files
feat(api): manual updates
1 parent 9c4bd4a commit f414299

File tree

5 files changed

+16
-146
lines changed

5 files changed

+16
-146
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 42
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/togetherai%2Ftogetherai-eacfa676c4ac9c051f61d4d25c1074315959b2e3d418bca529e6de2a9f6636e7.yml
33
openapi_spec_hash: 1d56caf3dd011e888fb911d34bd34aef
4-
config_hash: d037f56e1852edb91ceeb8cf7b12f50d
4+
config_hash: 50b86276412e927f8eb0e69e2857b1c7

api.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,16 +206,14 @@ Methods:
206206
Types:
207207

208208
- <code><a href="./src/resources/endpoints.ts">Autoscaling</a></code>
209-
- <code><a href="./src/resources/endpoints.ts">EndpointCreateResponse</a></code>
210-
- <code><a href="./src/resources/endpoints.ts">EndpointRetrieveResponse</a></code>
211-
- <code><a href="./src/resources/endpoints.ts">EndpointUpdateResponse</a></code>
209+
- <code><a href="./src/resources/endpoints.ts">DedicatedEndpoint</a></code>
212210
- <code><a href="./src/resources/endpoints.ts">EndpointListResponse</a></code>
213211

214212
Methods:
215213

216-
- <code title="post /endpoints">client.endpoints.<a href="./src/resources/endpoints.ts">create</a>({ ...params }) -> EndpointCreateResponse</code>
217-
- <code title="get /endpoints/{endpointId}">client.endpoints.<a href="./src/resources/endpoints.ts">retrieve</a>(endpointID) -> EndpointRetrieveResponse</code>
218-
- <code title="patch /endpoints/{endpointId}">client.endpoints.<a href="./src/resources/endpoints.ts">update</a>(endpointID, { ...params }) -> EndpointUpdateResponse</code>
214+
- <code title="post /endpoints">client.endpoints.<a href="./src/resources/endpoints.ts">create</a>({ ...params }) -> DedicatedEndpoint</code>
215+
- <code title="get /endpoints/{endpointId}">client.endpoints.<a href="./src/resources/endpoints.ts">retrieve</a>(endpointID) -> DedicatedEndpoint</code>
216+
- <code title="patch /endpoints/{endpointId}">client.endpoints.<a href="./src/resources/endpoints.ts">update</a>(endpointID, { ...params }) -> DedicatedEndpoint</code>
219217
- <code title="get /endpoints">client.endpoints.<a href="./src/resources/endpoints.ts">list</a>({ ...params }) -> EndpointListResponse</code>
220218
- <code title="delete /endpoints/{endpointId}">client.endpoints.<a href="./src/resources/endpoints.ts">delete</a>(endpointID) -> void</code>
221219

src/client.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,11 @@ import {
3939
import { Embedding, EmbeddingCreateParams, Embeddings } from './resources/embeddings';
4040
import {
4141
Autoscaling,
42+
DedicatedEndpoint,
4243
EndpointCreateParams,
43-
EndpointCreateResponse,
4444
EndpointListParams,
4545
EndpointListResponse,
46-
EndpointRetrieveResponse,
4746
EndpointUpdateParams,
48-
EndpointUpdateResponse,
4947
Endpoints,
5048
} from './resources/endpoints';
5149
import {
@@ -967,9 +965,7 @@ export declare namespace Together {
967965
export {
968966
Endpoints as Endpoints,
969967
type Autoscaling as Autoscaling,
970-
type EndpointCreateResponse as EndpointCreateResponse,
971-
type EndpointRetrieveResponse as EndpointRetrieveResponse,
972-
type EndpointUpdateResponse as EndpointUpdateResponse,
968+
type DedicatedEndpoint as DedicatedEndpoint,
973969
type EndpointListResponse as EndpointListResponse,
974970
type EndpointCreateParams as EndpointCreateParams,
975971
type EndpointUpdateParams as EndpointUpdateParams,

src/resources/endpoints.ts

Lines changed: 8 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ export class Endpoints extends APIResource {
1414
*
1515
* @example
1616
* ```ts
17-
* const endpoint = await client.endpoints.create({
17+
* const dedicatedEndpoint = await client.endpoints.create({
1818
* autoscaling: { max_replicas: 5, min_replicas: 2 },
1919
* hardware: '1x_nvidia_a100_80gb_sxm',
2020
* model: 'meta-llama/Llama-3-8b-chat-hf',
2121
* });
2222
* ```
2323
*/
24-
create(body: EndpointCreateParams, options?: RequestOptions): APIPromise<EndpointCreateResponse> {
24+
create(body: EndpointCreateParams, options?: RequestOptions): APIPromise<DedicatedEndpoint> {
2525
return this._client.post('/endpoints', { body, ...options });
2626
}
2727

@@ -31,12 +31,12 @@ export class Endpoints extends APIResource {
3131
*
3232
* @example
3333
* ```ts
34-
* const endpoint = await client.endpoints.retrieve(
34+
* const dedicatedEndpoint = await client.endpoints.retrieve(
3535
* 'endpoint-d23901de-ef8f-44bf-b3e7-de9c1ca8f2d7',
3636
* );
3737
* ```
3838
*/
39-
retrieve(endpointID: string, options?: RequestOptions): APIPromise<EndpointRetrieveResponse> {
39+
retrieve(endpointID: string, options?: RequestOptions): APIPromise<DedicatedEndpoint> {
4040
return this._client.get(path`/endpoints/${endpointID}`, options);
4141
}
4242

@@ -46,7 +46,7 @@ export class Endpoints extends APIResource {
4646
*
4747
* @example
4848
* ```ts
49-
* const endpoint = await client.endpoints.update(
49+
* const dedicatedEndpoint = await client.endpoints.update(
5050
* 'endpoint-d23901de-ef8f-44bf-b3e7-de9c1ca8f2d7',
5151
* );
5252
* ```
@@ -55,7 +55,7 @@ export class Endpoints extends APIResource {
5555
endpointID: string,
5656
body: EndpointUpdateParams,
5757
options?: RequestOptions,
58-
): APIPromise<EndpointUpdateResponse> {
58+
): APIPromise<DedicatedEndpoint> {
5959
return this._client.patch(path`/endpoints/${endpointID}`, { body, ...options });
6060
}
6161

@@ -111,127 +111,7 @@ export interface Autoscaling {
111111
/**
112112
* Details about a dedicated endpoint deployment
113113
*/
114-
export interface EndpointCreateResponse {
115-
/**
116-
* Unique identifier for the endpoint
117-
*/
118-
id: string;
119-
120-
/**
121-
* Configuration for automatic scaling of the endpoint
122-
*/
123-
autoscaling: Autoscaling;
124-
125-
/**
126-
* Timestamp when the endpoint was created
127-
*/
128-
created_at: string;
129-
130-
/**
131-
* Human-readable name for the endpoint
132-
*/
133-
display_name: string;
134-
135-
/**
136-
* The hardware configuration used for this endpoint
137-
*/
138-
hardware: string;
139-
140-
/**
141-
* The model deployed on this endpoint
142-
*/
143-
model: string;
144-
145-
/**
146-
* System name for the endpoint
147-
*/
148-
name: string;
149-
150-
/**
151-
* The type of object
152-
*/
153-
object: 'endpoint';
154-
155-
/**
156-
* The owner of this endpoint
157-
*/
158-
owner: string;
159-
160-
/**
161-
* Current state of the endpoint
162-
*/
163-
state: 'PENDING' | 'STARTING' | 'STARTED' | 'STOPPING' | 'STOPPED' | 'ERROR';
164-
165-
/**
166-
* The type of endpoint
167-
*/
168-
type: 'dedicated';
169-
}
170-
171-
/**
172-
* Details about a dedicated endpoint deployment
173-
*/
174-
export interface EndpointRetrieveResponse {
175-
/**
176-
* Unique identifier for the endpoint
177-
*/
178-
id: string;
179-
180-
/**
181-
* Configuration for automatic scaling of the endpoint
182-
*/
183-
autoscaling: Autoscaling;
184-
185-
/**
186-
* Timestamp when the endpoint was created
187-
*/
188-
created_at: string;
189-
190-
/**
191-
* Human-readable name for the endpoint
192-
*/
193-
display_name: string;
194-
195-
/**
196-
* The hardware configuration used for this endpoint
197-
*/
198-
hardware: string;
199-
200-
/**
201-
* The model deployed on this endpoint
202-
*/
203-
model: string;
204-
205-
/**
206-
* System name for the endpoint
207-
*/
208-
name: string;
209-
210-
/**
211-
* The type of object
212-
*/
213-
object: 'endpoint';
214-
215-
/**
216-
* The owner of this endpoint
217-
*/
218-
owner: string;
219-
220-
/**
221-
* Current state of the endpoint
222-
*/
223-
state: 'PENDING' | 'STARTING' | 'STARTED' | 'STOPPING' | 'STOPPED' | 'ERROR';
224-
225-
/**
226-
* The type of endpoint
227-
*/
228-
type: 'dedicated';
229-
}
230-
231-
/**
232-
* Details about a dedicated endpoint deployment
233-
*/
234-
export interface EndpointUpdateResponse {
114+
export interface DedicatedEndpoint {
235115
/**
236116
* Unique identifier for the endpoint
237117
*/
@@ -418,9 +298,7 @@ export interface EndpointListParams {
418298
export declare namespace Endpoints {
419299
export {
420300
type Autoscaling as Autoscaling,
421-
type EndpointCreateResponse as EndpointCreateResponse,
422-
type EndpointRetrieveResponse as EndpointRetrieveResponse,
423-
type EndpointUpdateResponse as EndpointUpdateResponse,
301+
type DedicatedEndpoint as DedicatedEndpoint,
424302
type EndpointListResponse as EndpointListResponse,
425303
type EndpointCreateParams as EndpointCreateParams,
426304
type EndpointUpdateParams as EndpointUpdateParams,

src/resources/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ export { Embeddings, type Embedding, type EmbeddingCreateParams } from './embedd
3636
export {
3737
Endpoints,
3838
type Autoscaling,
39-
type EndpointCreateResponse,
40-
type EndpointRetrieveResponse,
41-
type EndpointUpdateResponse,
39+
type DedicatedEndpoint,
4240
type EndpointListResponse,
4341
type EndpointCreateParams,
4442
type EndpointUpdateParams,

0 commit comments

Comments
 (0)