Skip to content

Commit 418cdbf

Browse files
feat(api): api update
1 parent 51be0d0 commit 418cdbf

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 28
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/togetherai%2Ftogetherai-df8486ebc1de1915a1611890eb571e387e1dac284df20962d10be37aa8855ce6.yml
3-
openapi_spec_hash: 499837ed4588ccbb5426ea3c1f0a4179
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/togetherai%2Ftogetherai-8f50cb3e342f2fd67f1f2cfda195b3d78c0740344f55f37cf1c99c66a0f7c2c5.yml
3+
openapi_spec_hash: b9907745f73f337395ffd5cef1e8a2d5
44
config_hash: a60b100624e80dc8d9144e7bc306f5ce

src/resources/models.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class Models extends APIResource {
1717
}
1818

1919
/**
20-
* Upload a custom model from Hugging Face or S3
20+
* Upload a custom model or adapter from Hugging Face or S3
2121
*
2222
* @example
2323
* ```ts
@@ -101,6 +101,12 @@ export interface ModelUploadParams {
101101
*/
102102
model_source: string;
103103

104+
/**
105+
* The base model to use for an adapter if setting it to run against a serverless
106+
* pool. Only used for model_type `adapter`.
107+
*/
108+
base_model?: string;
109+
104110
/**
105111
* A description of your model
106112
*/
@@ -110,6 +116,17 @@ export interface ModelUploadParams {
110116
* Hugging Face token (if uploading from Hugging Face)
111117
*/
112118
hf_token?: string;
119+
120+
/**
121+
* The lora pool to use for an adapter if setting it to run against, say, a
122+
* dedicated pool. Only used for model_type `adapter`.
123+
*/
124+
lora_model?: string;
125+
126+
/**
127+
* Whether the model is a full model or an adapter
128+
*/
129+
model_type?: 'model' | 'adapter';
113130
}
114131

115132
export declare namespace Models {

tests/api-resources/models.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,11 @@ describe('resource models', () => {
4545
const response = await client.models.upload({
4646
model_name: 'Qwen2.5-72B-Instruct',
4747
model_source: 'unsloth/Qwen2.5-72B-Instruct',
48+
base_model: 'Qwen/Qwen2.5-72B-Instruct',
4849
description: 'Finetuned Qwen2.5-72B-Instruct by Unsloth',
4950
hf_token: 'hf_examplehuggingfacetoken',
51+
lora_model: 'my_username/Qwen2.5-72B-Instruct-lora',
52+
model_type: 'model',
5053
});
5154
});
5255
});

0 commit comments

Comments
 (0)