together-ai 0.30.0 → 0.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +62 -0
- package/README.md +0 -49
- package/client.d.mts +23 -41
- package/client.d.mts.map +1 -1
- package/client.d.ts +23 -41
- package/client.d.ts.map +1 -1
- package/client.js +6 -23
- package/client.js.map +1 -1
- package/client.mjs +8 -25
- package/client.mjs.map +1 -1
- package/lib/check-file.d.mts +28 -0
- package/lib/check-file.d.mts.map +1 -0
- package/lib/check-file.d.ts +28 -0
- package/lib/check-file.d.ts.map +1 -0
- package/lib/check-file.js +469 -0
- package/lib/check-file.js.map +1 -0
- package/lib/check-file.mjs +461 -0
- package/lib/check-file.mjs.map +1 -0
- package/lib/upload.d.mts +4 -18
- package/lib/upload.d.mts.map +1 -1
- package/lib/upload.d.ts +4 -18
- package/lib/upload.d.ts.map +1 -1
- package/lib/upload.js +73 -231
- package/lib/upload.js.map +1 -1
- package/lib/upload.mjs +73 -228
- package/lib/upload.mjs.map +1 -1
- package/package.json +1 -5
- package/resources/audio/audio.d.mts +9 -94
- package/resources/audio/audio.d.mts.map +1 -1
- package/resources/audio/audio.d.ts +9 -94
- package/resources/audio/audio.d.ts.map +1 -1
- package/resources/audio/audio.js +8 -10
- package/resources/audio/audio.js.map +1 -1
- package/resources/audio/audio.mjs +8 -10
- package/resources/audio/audio.mjs.map +1 -1
- package/resources/audio/index.d.mts +3 -1
- package/resources/audio/index.d.mts.map +1 -1
- package/resources/audio/index.d.ts +3 -1
- package/resources/audio/index.d.ts.map +1 -1
- package/resources/audio/index.js +5 -1
- package/resources/audio/index.js.map +1 -1
- package/resources/audio/index.mjs +3 -1
- package/resources/audio/index.mjs.map +1 -1
- package/resources/audio/speech.d.mts +102 -0
- package/resources/audio/speech.d.mts.map +1 -0
- package/resources/audio/speech.d.ts +102 -0
- package/resources/audio/speech.d.ts.map +1 -0
- package/resources/audio/speech.js +19 -0
- package/resources/audio/speech.js.map +1 -0
- package/resources/audio/speech.mjs +15 -0
- package/resources/audio/speech.mjs.map +1 -0
- package/resources/audio/voices.d.mts +39 -0
- package/resources/audio/voices.d.mts.map +1 -0
- package/resources/audio/voices.d.ts +39 -0
- package/resources/audio/voices.d.ts.map +1 -0
- package/resources/audio/voices.js +20 -0
- package/resources/audio/voices.js.map +1 -0
- package/resources/audio/voices.mjs +16 -0
- package/resources/audio/voices.mjs.map +1 -0
- package/resources/batches.d.mts +20 -69
- package/resources/batches.d.mts.map +1 -1
- package/resources/batches.d.ts +20 -69
- package/resources/batches.d.ts.map +1 -1
- package/resources/batches.js +15 -2
- package/resources/batches.js.map +1 -1
- package/resources/batches.mjs +15 -2
- package/resources/batches.mjs.map +1 -1
- package/resources/chat/completions.d.mts +1 -0
- package/resources/chat/completions.d.mts.map +1 -1
- package/resources/chat/completions.d.ts +1 -0
- package/resources/chat/completions.d.ts.map +1 -1
- package/resources/completions.d.mts +1 -0
- package/resources/completions.d.mts.map +1 -1
- package/resources/completions.d.ts +1 -0
- package/resources/completions.d.ts.map +1 -1
- package/resources/endpoints.d.mts +35 -106
- package/resources/endpoints.d.mts.map +1 -1
- package/resources/endpoints.d.ts +35 -106
- package/resources/endpoints.d.ts.map +1 -1
- package/resources/endpoints.js +14 -3
- package/resources/endpoints.js.map +1 -1
- package/resources/endpoints.mjs +14 -3
- package/resources/endpoints.mjs.map +1 -1
- package/resources/evals.d.mts +346 -206
- package/resources/evals.d.mts.map +1 -1
- package/resources/evals.d.ts +346 -206
- package/resources/evals.d.ts.map +1 -1
- package/resources/evals.js +44 -11
- package/resources/evals.js.map +1 -1
- package/resources/evals.mjs +44 -11
- package/resources/evals.mjs.map +1 -1
- package/resources/files.d.mts +15 -70
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +15 -70
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +6 -4
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +6 -4
- package/resources/files.mjs.map +1 -1
- package/resources/{fine-tune.d.mts → fine-tuning.d.mts} +358 -129
- package/resources/fine-tuning.d.mts.map +1 -0
- package/resources/{fine-tune.d.ts → fine-tuning.d.ts} +358 -129
- package/resources/fine-tuning.d.ts.map +1 -0
- package/resources/{fine-tune.js → fine-tuning.js} +45 -22
- package/resources/fine-tuning.js.map +1 -0
- package/resources/{fine-tune.mjs → fine-tuning.mjs} +43 -20
- package/resources/fine-tuning.mjs.map +1 -0
- package/resources/images.d.mts +6 -6
- package/resources/images.d.mts.map +1 -1
- package/resources/images.d.ts +6 -6
- package/resources/images.d.ts.map +1 -1
- package/resources/images.js +2 -2
- package/resources/images.js.map +1 -1
- package/resources/images.mjs +2 -2
- package/resources/images.mjs.map +1 -1
- package/resources/index.d.mts +10 -10
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +10 -10
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -3
- package/resources/index.mjs.map +1 -1
- package/resources/models.d.mts +22 -24
- package/resources/models.d.mts.map +1 -1
- package/resources/models.d.ts +22 -24
- package/resources/models.d.ts.map +1 -1
- package/resources/models.js +1 -1
- package/resources/models.mjs +1 -1
- package/resources/{top-level.d.mts → rerank.d.mts} +30 -7
- package/resources/rerank.d.mts.map +1 -0
- package/resources/{top-level.d.ts → rerank.d.ts} +30 -7
- package/resources/rerank.d.ts.map +1 -0
- package/resources/rerank.js +29 -0
- package/resources/rerank.js.map +1 -0
- package/resources/rerank.mjs +25 -0
- package/resources/rerank.mjs.map +1 -0
- package/resources/videos.d.mts +3 -9
- package/resources/videos.d.mts.map +1 -1
- package/resources/videos.d.ts +3 -9
- package/resources/videos.d.ts.map +1 -1
- package/resources/videos.js +1 -1
- package/resources/videos.mjs +1 -1
- package/src/client.ts +69 -111
- package/src/lib/check-file.ts +713 -0
- package/src/lib/upload.ts +95 -290
- package/src/resources/audio/audio.ts +21 -145
- package/src/resources/audio/index.ts +7 -7
- package/src/resources/audio/speech.ts +155 -0
- package/src/resources/audio/voices.ts +49 -0
- package/src/resources/batches.ts +22 -96
- package/src/resources/chat/completions.ts +2 -0
- package/src/resources/completions.ts +2 -0
- package/src/resources/endpoints.ts +43 -130
- package/src/resources/evals.ts +413 -253
- package/src/resources/files.ts +19 -97
- package/src/resources/{fine-tune.ts → fine-tuning.ts} +498 -187
- package/src/resources/images.ts +6 -6
- package/src/resources/index.ts +34 -44
- package/src/resources/models.ts +23 -24
- package/src/resources/{top-level.ts → rerank.ts} +32 -6
- package/src/resources/videos.ts +3 -14
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/fine-tune.d.mts.map +0 -1
- package/resources/fine-tune.d.ts.map +0 -1
- package/resources/fine-tune.js.map +0 -1
- package/resources/fine-tune.mjs.map +0 -1
- package/resources/top-level.d.mts.map +0 -1
- package/resources/top-level.d.ts.map +0 -1
- package/resources/top-level.js +0 -4
- package/resources/top-level.js.map +0 -1
- package/resources/top-level.mjs +0 -3
- package/resources/top-level.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,67 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.31.1 (2025-12-01)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.31.0...v0.31.1](https://github.com/togethercomputer/together-typescript/compare/v0.31.0...v0.31.1)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* move optional dependency out of core dependency ([9c74017](https://github.com/togethercomputer/together-typescript/commit/9c7401705a9e5609bed9b1b0d1d5d7891fc47ce1))
|
|
10
|
+
|
|
11
|
+
## 0.31.0 (2025-12-01)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.30.0...v0.31.0](https://github.com/togethercomputer/together-typescript/compare/v0.30.0...v0.31.0)
|
|
14
|
+
|
|
15
|
+
### ⚠ BREAKING CHANGES
|
|
16
|
+
|
|
17
|
+
* **api:** Change call signature for `audio.create` to `audio.speech.create` to match spec with python library and add space for future APIs
|
|
18
|
+
* **api:** Update method signature for reranking to `rerank.create()`
|
|
19
|
+
* **api:** Change Fine Tuning method name from `download()` to `content()` to align with other namespaces
|
|
20
|
+
* **api:** For the TS SDK the `images.create` is now `images.generate`
|
|
21
|
+
* **api:** Access to the api for listing checkpoints has changed its name to `list_checkpoints`
|
|
22
|
+
* **api:** Access to fine tuning APIs namespace has changed from `fine_tune` to `fine_tuning`
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* **api:** Add audio.voices.list sdk ([890595e](https://github.com/togethercomputer/together-typescript/commit/890595e53cdfd3e28a60cde87426f48ddb81a261))
|
|
27
|
+
* **api:** Add batches.cancel API ([b1133f8](https://github.com/togethercomputer/together-typescript/commit/b1133f805588621237922f13cfd2b9e0a4401a0e))
|
|
28
|
+
* **api:** Add endpoints.list_avzones ([606fea8](https://github.com/togethercomputer/together-typescript/commit/606fea8873f5d511b619cfce63c3762ffc61db89))
|
|
29
|
+
* **api:** Add fine_tune.delete API ([79d0c84](https://github.com/togethercomputer/together-typescript/commit/79d0c84157bddcfe54de5d0ce1c12866b4c1243d))
|
|
30
|
+
* **api:** api update ([fed5c48](https://github.com/togethercomputer/together-typescript/commit/fed5c48d8966d5a27a14c9864425787835adedd9))
|
|
31
|
+
* **api:** api update ([1022fa6](https://github.com/togethercomputer/together-typescript/commit/1022fa67aa9b090292cecf1876eed0091e7497e5))
|
|
32
|
+
* **api:** api update ([da3e212](https://github.com/togethercomputer/together-typescript/commit/da3e212281b055ef30d492e350664e6fe61f0153))
|
|
33
|
+
* **api:** api update ([4be10bc](https://github.com/togethercomputer/together-typescript/commit/4be10bcc5ba0f6af6b42eda9edbb8d6bb921fb02))
|
|
34
|
+
* **api:** api update ([e594a76](https://github.com/togethercomputer/together-typescript/commit/e594a76294cf6c591b49f84f8769c045423b9d2a))
|
|
35
|
+
* **api:** api update ([8ec7bf0](https://github.com/togethercomputer/together-typescript/commit/8ec7bf0af42f2b9c4ff21f03a8978ed947bdec74))
|
|
36
|
+
* **api:** api update ([04797be](https://github.com/togethercomputer/together-typescript/commit/04797be698349057cec045107b183e19e99c0ef3))
|
|
37
|
+
* **api:** api update ([c219bfd](https://github.com/togethercomputer/together-typescript/commit/c219bfd42f433da46c8689929dd99eef55c9dda4))
|
|
38
|
+
* **api:** Change fine tuning download method to `.create` ([34f7fe5](https://github.com/togethercomputer/together-typescript/commit/34f7fe5c5a09f86163f895495749f4a6e9123581))
|
|
39
|
+
* **api:** Change image creation signature to `images.generate` ([250569f](https://github.com/togethercomputer/together-typescript/commit/250569f9e066e49c0bc70b36bcbb9f1f4e9afd1e))
|
|
40
|
+
* **api:** Change rerank method signature ([70a0ddc](https://github.com/togethercomputer/together-typescript/commit/70a0ddc63a2378a65a5064980043cc154aebe216))
|
|
41
|
+
* **api:** Change TTS call signature ([fd2189a](https://github.com/togethercomputer/together-typescript/commit/fd2189ae4f99a3e5c9c7873575858550a57d02cc))
|
|
42
|
+
* **api:** files.upload supported with custom file checks ([5cba49f](https://github.com/togethercomputer/together-typescript/commit/5cba49fcd138e7f0acb9c039f03a35eb82df9e30))
|
|
43
|
+
* **api:** Fix internal references for VideoJob spec ([2ce325f](https://github.com/togethercomputer/together-typescript/commit/2ce325f197109d8e8643576ebba95ed63836858c))
|
|
44
|
+
* **api:** manual updates ([9f78929](https://github.com/togethercomputer/together-typescript/commit/9f78929f9162d4c84a0f0643d4070d96dac32e76))
|
|
45
|
+
* **api:** Update Eval APIs ([c91b8c0](https://github.com/togethercomputer/together-typescript/commit/c91b8c082eb8e84841820d23bf7dbf1450525b67))
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Chores
|
|
49
|
+
|
|
50
|
+
* **api:** Cleanup some exported types ([3b1eddb](https://github.com/togethercomputer/together-typescript/commit/3b1eddba23b115bc29a771dd08e72e3789a7f3bc))
|
|
51
|
+
* **api:** Ensure file.upload API remains in codebase after stainless sync ([68895c0](https://github.com/togethercomputer/together-typescript/commit/68895c0a387fcc1ed68b36e927d6696004715b92))
|
|
52
|
+
* **api:** Remove API that is not intended to be public. ([46dcc83](https://github.com/togethercomputer/together-typescript/commit/46dcc8313cd4c05489c9751d3856ef5afc76a01c))
|
|
53
|
+
* **api:** Remove auto-generated files upload API to support custom coded version ([94c54cb](https://github.com/togethercomputer/together-typescript/commit/94c54cbd65bdee4bd671c8cbe97384b51c3da674))
|
|
54
|
+
* **client:** fix logger property type ([10df0df](https://github.com/togethercomputer/together-typescript/commit/10df0dffb4279a11317cdb27f81dc8ee9834a27a))
|
|
55
|
+
* Fix API example ([8f34c93](https://github.com/togethercomputer/together-typescript/commit/8f34c934bd573b99dc1521821f9d57c0cbf9dea8))
|
|
56
|
+
* Fix fine tuning examples ([b477053](https://github.com/togethercomputer/together-typescript/commit/b477053e00e72257bda93c75d1dec54326e84628))
|
|
57
|
+
* fix lint and type checks ([#201](https://github.com/togethercomputer/together-typescript/issues/201)) ([963673f](https://github.com/togethercomputer/together-typescript/commit/963673f91ea6f4c9bf85258556b5ac73007a9e7e))
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
### Styles
|
|
61
|
+
|
|
62
|
+
* **api:** Change fine tuning method `retrieve_checkpoints` to `list_checkpoints` ([b2c168a](https://github.com/togethercomputer/together-typescript/commit/b2c168afce5f78c915b06559d2c226b5220160c1))
|
|
63
|
+
* **api:** Change fine tuning namespace to `fine_tuning` ([77b1211](https://github.com/togethercomputer/together-typescript/commit/77b1211ece96ad340628409c0ae08bac9fab2e0a))
|
|
64
|
+
|
|
3
65
|
## 0.30.0 (2025-11-04)
|
|
4
66
|
|
|
5
67
|
Full Changelog: [v0.29.0...v0.30.0](https://github.com/togethercomputer/together-typescript/compare/v0.29.0...v0.30.0)
|
package/README.md
CHANGED
|
@@ -77,55 +77,6 @@ const chatCompletion: Together.Chat.ChatCompletion = await client.chat.completio
|
|
|
77
77
|
|
|
78
78
|
Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
|
|
79
79
|
|
|
80
|
-
## File uploads
|
|
81
|
-
|
|
82
|
-
Request parameters that correspond to file uploads can be passed in many different forms:
|
|
83
|
-
|
|
84
|
-
- `File` (or an object with the same structure)
|
|
85
|
-
- a `fetch` `Response` (or an object with the same structure)
|
|
86
|
-
- an `fs.ReadStream`
|
|
87
|
-
- the return value of our `toFile` helper
|
|
88
|
-
|
|
89
|
-
```ts
|
|
90
|
-
import fs from 'fs';
|
|
91
|
-
import Together, { toFile } from 'together-ai';
|
|
92
|
-
|
|
93
|
-
const client = new Together();
|
|
94
|
-
|
|
95
|
-
// If you have access to Node `fs` we recommend using `fs.createReadStream()`:
|
|
96
|
-
await client.files.upload({
|
|
97
|
-
file: fs.createReadStream('/path/to/file'),
|
|
98
|
-
file_name: 'dataset.csv',
|
|
99
|
-
purpose: 'fine-tune',
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
// Or if you have the web `File` API you can pass a `File` instance:
|
|
103
|
-
await client.files.upload({
|
|
104
|
-
file: new File(['my bytes'], 'file'),
|
|
105
|
-
file_name: 'dataset.csv',
|
|
106
|
-
purpose: 'fine-tune',
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
// You can also pass a `fetch` `Response`:
|
|
110
|
-
await client.files.upload({
|
|
111
|
-
file: await fetch('https://somesite/file'),
|
|
112
|
-
file_name: 'dataset.csv',
|
|
113
|
-
purpose: 'fine-tune',
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
// Finally, if none of the above are convenient, you can use our `toFile` helper:
|
|
117
|
-
await client.files.upload({
|
|
118
|
-
file: await toFile(Buffer.from('my bytes'), 'file'),
|
|
119
|
-
file_name: 'dataset.csv',
|
|
120
|
-
purpose: 'fine-tune',
|
|
121
|
-
});
|
|
122
|
-
await client.files.upload({
|
|
123
|
-
file: await toFile(new Uint8Array([0, 1, 2]), 'file'),
|
|
124
|
-
file_name: 'dataset.csv',
|
|
125
|
-
purpose: 'fine-tune',
|
|
126
|
-
});
|
|
127
|
-
```
|
|
128
|
-
|
|
129
80
|
## Handling errors
|
|
130
81
|
|
|
131
82
|
When the library is unable to connect to the API,
|
package/client.d.mts
CHANGED
|
@@ -5,22 +5,21 @@ import * as Opts from "./internal/request-options.mjs";
|
|
|
5
5
|
import * as Errors from "./core/error.mjs";
|
|
6
6
|
import * as Uploads from "./core/uploads.mjs";
|
|
7
7
|
import * as API from "./resources/index.mjs";
|
|
8
|
-
import * as TopLevelAPI from "./resources/top-level.mjs";
|
|
9
|
-
import { RerankParams, RerankResponse } from "./resources/top-level.mjs";
|
|
10
8
|
import { APIPromise } from "./core/api-promise.mjs";
|
|
11
|
-
import { BatchCreateParams, BatchCreateResponse,
|
|
9
|
+
import { BatchCreateParams, BatchCreateResponse, BatchJob, BatchListResponse, Batches } from "./resources/batches.mjs";
|
|
12
10
|
import { Completion, CompletionChunk, CompletionCreateParams, CompletionCreateParamsNonStreaming, CompletionCreateParamsStreaming, Completions, LogProbs, ToolChoice, Tools } from "./resources/completions.mjs";
|
|
13
11
|
import { Embedding, EmbeddingCreateParams, Embeddings } from "./resources/embeddings.mjs";
|
|
14
|
-
import { Autoscaling, EndpointCreateParams,
|
|
15
|
-
import {
|
|
16
|
-
import { FileDeleteResponse,
|
|
17
|
-
import {
|
|
12
|
+
import { Autoscaling, DedicatedEndpoint, EndpointCreateParams, EndpointListAvzonesResponse, EndpointListParams, EndpointListResponse, EndpointUpdateParams, Endpoints } from "./resources/endpoints.mjs";
|
|
13
|
+
import { EvalCreateParams, EvalCreateResponse, EvalListParams, EvalListResponse, EvalStatusResponse, Evals, EvaluationJob } from "./resources/evals.mjs";
|
|
14
|
+
import { FileDeleteResponse, FileList, FileObject, FilePurpose, FileResponse, FileType, Files } from "./resources/files.mjs";
|
|
15
|
+
import { FineTuning, FineTuningCancelResponse, FineTuningContentParams, FineTuningCreateParams, FineTuningCreateResponse, FineTuningDeleteParams, FineTuningDeleteResponse, FineTuningListCheckpointsResponse, FineTuningListEventsResponse, FineTuningListResponse, FinetuneEvent, FinetuneEventType, FinetuneResponse } from "./resources/fine-tuning.mjs";
|
|
18
16
|
import { Hardware, HardwareListParams, HardwareListResponse } from "./resources/hardware.mjs";
|
|
19
|
-
import {
|
|
17
|
+
import { ImageDataB64, ImageDataURL, ImageFile, ImageGenerateParams, Images } from "./resources/images.mjs";
|
|
20
18
|
import { JobListResponse, JobRetrieveResponse, Jobs } from "./resources/jobs.mjs";
|
|
21
|
-
import { ModelListResponse, ModelUploadParams, ModelUploadResponse, Models } from "./resources/models.mjs";
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
19
|
+
import { ModelListResponse, ModelObject, ModelUploadParams, ModelUploadResponse, Models } from "./resources/models.mjs";
|
|
20
|
+
import { Rerank, RerankCreateParams, RerankCreateResponse } from "./resources/rerank.mjs";
|
|
21
|
+
import { VideoCreateParams, VideoJob, Videos } from "./resources/videos.mjs";
|
|
22
|
+
import { Audio, AudioFile, AudioSpeechStreamChunk } from "./resources/audio/audio.mjs";
|
|
24
23
|
import { Chat } from "./resources/chat/chat.mjs";
|
|
25
24
|
import { CodeInterpreter, CodeInterpreterExecuteParams, ExecuteResponse } from "./resources/code-interpreter/code-interpreter.mjs";
|
|
26
25
|
import { type Fetch } from "./internal/builtin-types.mjs";
|
|
@@ -102,7 +101,7 @@ export declare class Together {
|
|
|
102
101
|
baseURL: string;
|
|
103
102
|
maxRetries: number;
|
|
104
103
|
timeout: number;
|
|
105
|
-
logger: Logger
|
|
104
|
+
logger: Logger;
|
|
106
105
|
logLevel: LogLevel | undefined;
|
|
107
106
|
fetchOptions: MergedRequestInit | undefined;
|
|
108
107
|
private fetch;
|
|
@@ -125,24 +124,6 @@ export declare class Together {
|
|
|
125
124
|
* Create a new client instance re-using the same options given to the current client with optional overriding.
|
|
126
125
|
*/
|
|
127
126
|
withOptions(options: Partial<ClientOptions>): this;
|
|
128
|
-
/**
|
|
129
|
-
* Query a reranker model
|
|
130
|
-
*
|
|
131
|
-
* @example
|
|
132
|
-
* ```ts
|
|
133
|
-
* const response = await client.rerank({
|
|
134
|
-
* documents: [
|
|
135
|
-
* { title: 'bar', text: 'bar' },
|
|
136
|
-
* { title: 'bar', text: 'bar' },
|
|
137
|
-
* { title: 'bar', text: 'bar' },
|
|
138
|
-
* { title: 'bar', text: 'bar' },
|
|
139
|
-
* ],
|
|
140
|
-
* model: 'Salesforce/Llama-Rank-V1',
|
|
141
|
-
* query: 'What animals can I find near Peru?',
|
|
142
|
-
* });
|
|
143
|
-
* ```
|
|
144
|
-
*/
|
|
145
|
-
rerank(body: TopLevelAPI.RerankParams, options?: RequestOptions): APIPromise<TopLevelAPI.RerankResponse>;
|
|
146
127
|
protected defaultQuery(): Record<string, string | undefined> | undefined;
|
|
147
128
|
protected validateHeaders({ values, nulls }: NullableHeaders): void;
|
|
148
129
|
protected authHeaders(opts: FinalRequestOptions): Promise<NullableHeaders | undefined>;
|
|
@@ -209,7 +190,7 @@ export declare class Together {
|
|
|
209
190
|
completions: API.Completions;
|
|
210
191
|
embeddings: API.Embeddings;
|
|
211
192
|
files: API.Files;
|
|
212
|
-
|
|
193
|
+
fineTuning: API.FineTuning;
|
|
213
194
|
codeInterpreter: API.CodeInterpreter;
|
|
214
195
|
images: API.Images;
|
|
215
196
|
videos: API.Videos;
|
|
@@ -218,26 +199,27 @@ export declare class Together {
|
|
|
218
199
|
jobs: API.Jobs;
|
|
219
200
|
endpoints: API.Endpoints;
|
|
220
201
|
hardware: API.Hardware;
|
|
202
|
+
rerank: API.Rerank;
|
|
221
203
|
batches: API.Batches;
|
|
222
204
|
evals: API.Evals;
|
|
223
205
|
}
|
|
224
206
|
export declare namespace Together {
|
|
225
207
|
export type RequestOptions = Opts.RequestOptions;
|
|
226
|
-
export { type RerankResponse as RerankResponse, type RerankParams as RerankParams };
|
|
227
208
|
export { Chat as Chat };
|
|
228
209
|
export { Completions as Completions, type Completion as Completion, type CompletionChunk as CompletionChunk, type LogProbs as LogProbs, type ToolChoice as ToolChoice, type Tools as Tools, type CompletionCreateParams as CompletionCreateParams, type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, };
|
|
229
210
|
export { Embeddings as Embeddings, type Embedding as Embedding, type EmbeddingCreateParams as EmbeddingCreateParams, };
|
|
230
|
-
export { Files as Files, type
|
|
231
|
-
export {
|
|
211
|
+
export { Files as Files, type FileList as FileList, type FileObject as FileObject, type FilePurpose as FilePurpose, type FileResponse as FileResponse, type FileType as FileType, type FileDeleteResponse as FileDeleteResponse, };
|
|
212
|
+
export { FineTuning as FineTuning, type FinetuneEvent as FinetuneEvent, type FinetuneEventType as FinetuneEventType, type FinetuneResponse as FinetuneResponse, type FineTuningCreateResponse as FineTuningCreateResponse, type FineTuningListResponse as FineTuningListResponse, type FineTuningDeleteResponse as FineTuningDeleteResponse, type FineTuningCancelResponse as FineTuningCancelResponse, type FineTuningListCheckpointsResponse as FineTuningListCheckpointsResponse, type FineTuningListEventsResponse as FineTuningListEventsResponse, type FineTuningCreateParams as FineTuningCreateParams, type FineTuningDeleteParams as FineTuningDeleteParams, type FineTuningContentParams as FineTuningContentParams, };
|
|
232
213
|
export { CodeInterpreter as CodeInterpreter, type ExecuteResponse as ExecuteResponse, type CodeInterpreterExecuteParams as CodeInterpreterExecuteParams, };
|
|
233
|
-
export { Images as Images, type ImageDataB64 as ImageDataB64, type ImageDataURL as ImageDataURL, type ImageFile as ImageFile, type
|
|
234
|
-
export { Videos as Videos, type VideoJob as VideoJob, type
|
|
235
|
-
export { Audio as Audio, type AudioFile as AudioFile, type AudioSpeechStreamChunk as AudioSpeechStreamChunk,
|
|
236
|
-
export { Models as Models, type ModelListResponse as ModelListResponse, type ModelUploadResponse as ModelUploadResponse, type ModelUploadParams as ModelUploadParams, };
|
|
214
|
+
export { Images as Images, type ImageDataB64 as ImageDataB64, type ImageDataURL as ImageDataURL, type ImageFile as ImageFile, type ImageGenerateParams as ImageGenerateParams, };
|
|
215
|
+
export { Videos as Videos, type VideoJob as VideoJob, type VideoCreateParams as VideoCreateParams };
|
|
216
|
+
export { Audio as Audio, type AudioFile as AudioFile, type AudioSpeechStreamChunk as AudioSpeechStreamChunk, };
|
|
217
|
+
export { Models as Models, type ModelObject as ModelObject, type ModelListResponse as ModelListResponse, type ModelUploadResponse as ModelUploadResponse, type ModelUploadParams as ModelUploadParams, };
|
|
237
218
|
export { Jobs as Jobs, type JobRetrieveResponse as JobRetrieveResponse, type JobListResponse as JobListResponse, };
|
|
238
|
-
export { Endpoints as Endpoints, type Autoscaling as Autoscaling, type
|
|
219
|
+
export { Endpoints as Endpoints, type Autoscaling as Autoscaling, type DedicatedEndpoint as DedicatedEndpoint, type EndpointListResponse as EndpointListResponse, type EndpointListAvzonesResponse as EndpointListAvzonesResponse, type EndpointCreateParams as EndpointCreateParams, type EndpointUpdateParams as EndpointUpdateParams, type EndpointListParams as EndpointListParams, };
|
|
239
220
|
export { Hardware as Hardware, type HardwareListResponse as HardwareListResponse, type HardwareListParams as HardwareListParams, };
|
|
240
|
-
export {
|
|
241
|
-
export {
|
|
221
|
+
export { Rerank as Rerank, type RerankCreateResponse as RerankCreateResponse, type RerankCreateParams as RerankCreateParams, };
|
|
222
|
+
export { Batches as Batches, type BatchJob as BatchJob, type BatchCreateResponse as BatchCreateResponse, type BatchListResponse as BatchListResponse, type BatchCreateParams as BatchCreateParams, };
|
|
223
|
+
export { Evals as Evals, type EvaluationJob as EvaluationJob, type EvalCreateResponse as EvalCreateResponse, type EvalListResponse as EvalListResponse, type EvalStatusResponse as EvalStatusResponse, type EvalCreateParams as EvalCreateParams, type EvalListParams as EvalListParams, };
|
|
242
224
|
}
|
|
243
225
|
//# sourceMappingURL=client.d.mts.map
|
package/client.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.mts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAET,KAAK,MAAM;OACX,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,
|
|
1
|
+
{"version":3,"file":"client.d.mts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAET,KAAK,MAAM;OACX,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EAAE,UAAU,EAAE;OACd,EACL,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,iBAAiB,EACjB,OAAO,EACR;OACM,EACL,UAAU,EACV,eAAe,EACf,sBAAsB,EACtB,kCAAkC,EAClC,+BAA+B,EAC/B,WAAW,EACX,QAAQ,EACR,UAAU,EACV,KAAK,EACN;OACM,EAAE,SAAS,EAAE,qBAAqB,EAAE,UAAU,EAAE;OAChD,EACL,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,2BAA2B,EAC3B,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,SAAS,EACV;OACM,EACL,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,EACL,aAAa,EACd;OACM,EACL,kBAAkB,EAClB,QAAQ,EACR,UAAU,EACV,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,KAAK,EACN;OACM,EACL,UAAU,EACV,wBAAwB,EACxB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,iCAAiC,EACjC,4BAA4B,EAC5B,sBAAsB,EACtB,aAAa,EACb,iBAAiB,EACjB,gB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as Opts from "./internal/request-options.js";
|
|
|
5
5
|
import * as Errors from "./core/error.js";
|
|
6
6
|
import * as Uploads from "./core/uploads.js";
|
|
7
7
|
import * as API from "./resources/index.js";
|
|
8
|
-
import * as TopLevelAPI from "./resources/top-level.js";
|
|
9
|
-
import { RerankParams, RerankResponse } from "./resources/top-level.js";
|
|
10
8
|
import { APIPromise } from "./core/api-promise.js";
|
|
11
|
-
import { BatchCreateParams, BatchCreateResponse,
|
|
9
|
+
import { BatchCreateParams, BatchCreateResponse, BatchJob, BatchListResponse, Batches } from "./resources/batches.js";
|
|
12
10
|
import { Completion, CompletionChunk, CompletionCreateParams, CompletionCreateParamsNonStreaming, CompletionCreateParamsStreaming, Completions, LogProbs, ToolChoice, Tools } from "./resources/completions.js";
|
|
13
11
|
import { Embedding, EmbeddingCreateParams, Embeddings } from "./resources/embeddings.js";
|
|
14
|
-
import { Autoscaling, EndpointCreateParams,
|
|
15
|
-
import {
|
|
16
|
-
import { FileDeleteResponse,
|
|
17
|
-
import {
|
|
12
|
+
import { Autoscaling, DedicatedEndpoint, EndpointCreateParams, EndpointListAvzonesResponse, EndpointListParams, EndpointListResponse, EndpointUpdateParams, Endpoints } from "./resources/endpoints.js";
|
|
13
|
+
import { EvalCreateParams, EvalCreateResponse, EvalListParams, EvalListResponse, EvalStatusResponse, Evals, EvaluationJob } from "./resources/evals.js";
|
|
14
|
+
import { FileDeleteResponse, FileList, FileObject, FilePurpose, FileResponse, FileType, Files } from "./resources/files.js";
|
|
15
|
+
import { FineTuning, FineTuningCancelResponse, FineTuningContentParams, FineTuningCreateParams, FineTuningCreateResponse, FineTuningDeleteParams, FineTuningDeleteResponse, FineTuningListCheckpointsResponse, FineTuningListEventsResponse, FineTuningListResponse, FinetuneEvent, FinetuneEventType, FinetuneResponse } from "./resources/fine-tuning.js";
|
|
18
16
|
import { Hardware, HardwareListParams, HardwareListResponse } from "./resources/hardware.js";
|
|
19
|
-
import {
|
|
17
|
+
import { ImageDataB64, ImageDataURL, ImageFile, ImageGenerateParams, Images } from "./resources/images.js";
|
|
20
18
|
import { JobListResponse, JobRetrieveResponse, Jobs } from "./resources/jobs.js";
|
|
21
|
-
import { ModelListResponse, ModelUploadParams, ModelUploadResponse, Models } from "./resources/models.js";
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
19
|
+
import { ModelListResponse, ModelObject, ModelUploadParams, ModelUploadResponse, Models } from "./resources/models.js";
|
|
20
|
+
import { Rerank, RerankCreateParams, RerankCreateResponse } from "./resources/rerank.js";
|
|
21
|
+
import { VideoCreateParams, VideoJob, Videos } from "./resources/videos.js";
|
|
22
|
+
import { Audio, AudioFile, AudioSpeechStreamChunk } from "./resources/audio/audio.js";
|
|
24
23
|
import { Chat } from "./resources/chat/chat.js";
|
|
25
24
|
import { CodeInterpreter, CodeInterpreterExecuteParams, ExecuteResponse } from "./resources/code-interpreter/code-interpreter.js";
|
|
26
25
|
import { type Fetch } from "./internal/builtin-types.js";
|
|
@@ -102,7 +101,7 @@ export declare class Together {
|
|
|
102
101
|
baseURL: string;
|
|
103
102
|
maxRetries: number;
|
|
104
103
|
timeout: number;
|
|
105
|
-
logger: Logger
|
|
104
|
+
logger: Logger;
|
|
106
105
|
logLevel: LogLevel | undefined;
|
|
107
106
|
fetchOptions: MergedRequestInit | undefined;
|
|
108
107
|
private fetch;
|
|
@@ -125,24 +124,6 @@ export declare class Together {
|
|
|
125
124
|
* Create a new client instance re-using the same options given to the current client with optional overriding.
|
|
126
125
|
*/
|
|
127
126
|
withOptions(options: Partial<ClientOptions>): this;
|
|
128
|
-
/**
|
|
129
|
-
* Query a reranker model
|
|
130
|
-
*
|
|
131
|
-
* @example
|
|
132
|
-
* ```ts
|
|
133
|
-
* const response = await client.rerank({
|
|
134
|
-
* documents: [
|
|
135
|
-
* { title: 'bar', text: 'bar' },
|
|
136
|
-
* { title: 'bar', text: 'bar' },
|
|
137
|
-
* { title: 'bar', text: 'bar' },
|
|
138
|
-
* { title: 'bar', text: 'bar' },
|
|
139
|
-
* ],
|
|
140
|
-
* model: 'Salesforce/Llama-Rank-V1',
|
|
141
|
-
* query: 'What animals can I find near Peru?',
|
|
142
|
-
* });
|
|
143
|
-
* ```
|
|
144
|
-
*/
|
|
145
|
-
rerank(body: TopLevelAPI.RerankParams, options?: RequestOptions): APIPromise<TopLevelAPI.RerankResponse>;
|
|
146
127
|
protected defaultQuery(): Record<string, string | undefined> | undefined;
|
|
147
128
|
protected validateHeaders({ values, nulls }: NullableHeaders): void;
|
|
148
129
|
protected authHeaders(opts: FinalRequestOptions): Promise<NullableHeaders | undefined>;
|
|
@@ -209,7 +190,7 @@ export declare class Together {
|
|
|
209
190
|
completions: API.Completions;
|
|
210
191
|
embeddings: API.Embeddings;
|
|
211
192
|
files: API.Files;
|
|
212
|
-
|
|
193
|
+
fineTuning: API.FineTuning;
|
|
213
194
|
codeInterpreter: API.CodeInterpreter;
|
|
214
195
|
images: API.Images;
|
|
215
196
|
videos: API.Videos;
|
|
@@ -218,26 +199,27 @@ export declare class Together {
|
|
|
218
199
|
jobs: API.Jobs;
|
|
219
200
|
endpoints: API.Endpoints;
|
|
220
201
|
hardware: API.Hardware;
|
|
202
|
+
rerank: API.Rerank;
|
|
221
203
|
batches: API.Batches;
|
|
222
204
|
evals: API.Evals;
|
|
223
205
|
}
|
|
224
206
|
export declare namespace Together {
|
|
225
207
|
export type RequestOptions = Opts.RequestOptions;
|
|
226
|
-
export { type RerankResponse as RerankResponse, type RerankParams as RerankParams };
|
|
227
208
|
export { Chat as Chat };
|
|
228
209
|
export { Completions as Completions, type Completion as Completion, type CompletionChunk as CompletionChunk, type LogProbs as LogProbs, type ToolChoice as ToolChoice, type Tools as Tools, type CompletionCreateParams as CompletionCreateParams, type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, };
|
|
229
210
|
export { Embeddings as Embeddings, type Embedding as Embedding, type EmbeddingCreateParams as EmbeddingCreateParams, };
|
|
230
|
-
export { Files as Files, type
|
|
231
|
-
export {
|
|
211
|
+
export { Files as Files, type FileList as FileList, type FileObject as FileObject, type FilePurpose as FilePurpose, type FileResponse as FileResponse, type FileType as FileType, type FileDeleteResponse as FileDeleteResponse, };
|
|
212
|
+
export { FineTuning as FineTuning, type FinetuneEvent as FinetuneEvent, type FinetuneEventType as FinetuneEventType, type FinetuneResponse as FinetuneResponse, type FineTuningCreateResponse as FineTuningCreateResponse, type FineTuningListResponse as FineTuningListResponse, type FineTuningDeleteResponse as FineTuningDeleteResponse, type FineTuningCancelResponse as FineTuningCancelResponse, type FineTuningListCheckpointsResponse as FineTuningListCheckpointsResponse, type FineTuningListEventsResponse as FineTuningListEventsResponse, type FineTuningCreateParams as FineTuningCreateParams, type FineTuningDeleteParams as FineTuningDeleteParams, type FineTuningContentParams as FineTuningContentParams, };
|
|
232
213
|
export { CodeInterpreter as CodeInterpreter, type ExecuteResponse as ExecuteResponse, type CodeInterpreterExecuteParams as CodeInterpreterExecuteParams, };
|
|
233
|
-
export { Images as Images, type ImageDataB64 as ImageDataB64, type ImageDataURL as ImageDataURL, type ImageFile as ImageFile, type
|
|
234
|
-
export { Videos as Videos, type VideoJob as VideoJob, type
|
|
235
|
-
export { Audio as Audio, type AudioFile as AudioFile, type AudioSpeechStreamChunk as AudioSpeechStreamChunk,
|
|
236
|
-
export { Models as Models, type ModelListResponse as ModelListResponse, type ModelUploadResponse as ModelUploadResponse, type ModelUploadParams as ModelUploadParams, };
|
|
214
|
+
export { Images as Images, type ImageDataB64 as ImageDataB64, type ImageDataURL as ImageDataURL, type ImageFile as ImageFile, type ImageGenerateParams as ImageGenerateParams, };
|
|
215
|
+
export { Videos as Videos, type VideoJob as VideoJob, type VideoCreateParams as VideoCreateParams };
|
|
216
|
+
export { Audio as Audio, type AudioFile as AudioFile, type AudioSpeechStreamChunk as AudioSpeechStreamChunk, };
|
|
217
|
+
export { Models as Models, type ModelObject as ModelObject, type ModelListResponse as ModelListResponse, type ModelUploadResponse as ModelUploadResponse, type ModelUploadParams as ModelUploadParams, };
|
|
237
218
|
export { Jobs as Jobs, type JobRetrieveResponse as JobRetrieveResponse, type JobListResponse as JobListResponse, };
|
|
238
|
-
export { Endpoints as Endpoints, type Autoscaling as Autoscaling, type
|
|
219
|
+
export { Endpoints as Endpoints, type Autoscaling as Autoscaling, type DedicatedEndpoint as DedicatedEndpoint, type EndpointListResponse as EndpointListResponse, type EndpointListAvzonesResponse as EndpointListAvzonesResponse, type EndpointCreateParams as EndpointCreateParams, type EndpointUpdateParams as EndpointUpdateParams, type EndpointListParams as EndpointListParams, };
|
|
239
220
|
export { Hardware as Hardware, type HardwareListResponse as HardwareListResponse, type HardwareListParams as HardwareListParams, };
|
|
240
|
-
export {
|
|
241
|
-
export {
|
|
221
|
+
export { Rerank as Rerank, type RerankCreateResponse as RerankCreateResponse, type RerankCreateParams as RerankCreateParams, };
|
|
222
|
+
export { Batches as Batches, type BatchJob as BatchJob, type BatchCreateResponse as BatchCreateResponse, type BatchListResponse as BatchListResponse, type BatchCreateParams as BatchCreateParams, };
|
|
223
|
+
export { Evals as Evals, type EvaluationJob as EvaluationJob, type EvalCreateResponse as EvalCreateResponse, type EvalListResponse as EvalListResponse, type EvalStatusResponse as EvalStatusResponse, type EvalCreateParams as EvalCreateParams, type EvalListParams as EvalListParams, };
|
|
242
224
|
}
|
|
243
225
|
//# sourceMappingURL=client.d.ts.map
|
package/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAET,KAAK,MAAM;OACX,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,
|
|
1
|
+
{"version":3,"file":"client.d.ts","source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O,EACL,SAAS,IAAI,SAAS,EACtB,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;IAEF,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
|
package/client.js
CHANGED
|
@@ -22,11 +22,12 @@ const embeddings_1 = require("./resources/embeddings.js");
|
|
|
22
22
|
const endpoints_1 = require("./resources/endpoints.js");
|
|
23
23
|
const evals_1 = require("./resources/evals.js");
|
|
24
24
|
const files_1 = require("./resources/files.js");
|
|
25
|
-
const
|
|
25
|
+
const fine_tuning_1 = require("./resources/fine-tuning.js");
|
|
26
26
|
const hardware_1 = require("./resources/hardware.js");
|
|
27
27
|
const images_1 = require("./resources/images.js");
|
|
28
28
|
const jobs_1 = require("./resources/jobs.js");
|
|
29
29
|
const models_1 = require("./resources/models.js");
|
|
30
|
+
const rerank_1 = require("./resources/rerank.js");
|
|
30
31
|
const videos_1 = require("./resources/videos.js");
|
|
31
32
|
const audio_1 = require("./resources/audio/audio.js");
|
|
32
33
|
const chat_1 = require("./resources/chat/chat.js");
|
|
@@ -58,7 +59,7 @@ class Together {
|
|
|
58
59
|
this.completions = new API.Completions(this);
|
|
59
60
|
this.embeddings = new API.Embeddings(this);
|
|
60
61
|
this.files = new API.Files(this);
|
|
61
|
-
this.
|
|
62
|
+
this.fineTuning = new API.FineTuning(this);
|
|
62
63
|
this.codeInterpreter = new API.CodeInterpreter(this);
|
|
63
64
|
this.images = new API.Images(this);
|
|
64
65
|
this.videos = new API.Videos(this);
|
|
@@ -67,6 +68,7 @@ class Together {
|
|
|
67
68
|
this.jobs = new API.Jobs(this);
|
|
68
69
|
this.endpoints = new API.Endpoints(this);
|
|
69
70
|
this.hardware = new API.Hardware(this);
|
|
71
|
+
this.rerank = new API.Rerank(this);
|
|
70
72
|
this.batches = new API.Batches(this);
|
|
71
73
|
this.evals = new API.Evals(this);
|
|
72
74
|
if (apiKey === undefined) {
|
|
@@ -112,26 +114,6 @@ class Together {
|
|
|
112
114
|
});
|
|
113
115
|
return client;
|
|
114
116
|
}
|
|
115
|
-
/**
|
|
116
|
-
* Query a reranker model
|
|
117
|
-
*
|
|
118
|
-
* @example
|
|
119
|
-
* ```ts
|
|
120
|
-
* const response = await client.rerank({
|
|
121
|
-
* documents: [
|
|
122
|
-
* { title: 'bar', text: 'bar' },
|
|
123
|
-
* { title: 'bar', text: 'bar' },
|
|
124
|
-
* { title: 'bar', text: 'bar' },
|
|
125
|
-
* { title: 'bar', text: 'bar' },
|
|
126
|
-
* ],
|
|
127
|
-
* model: 'Salesforce/Llama-Rank-V1',
|
|
128
|
-
* query: 'What animals can I find near Peru?',
|
|
129
|
-
* });
|
|
130
|
-
* ```
|
|
131
|
-
*/
|
|
132
|
-
rerank(body, options) {
|
|
133
|
-
return this.post('/rerank', { body, ...options });
|
|
134
|
-
}
|
|
135
117
|
defaultQuery() {
|
|
136
118
|
return this._options.defaultQuery;
|
|
137
119
|
}
|
|
@@ -510,7 +492,7 @@ Together.Chat = chat_1.Chat;
|
|
|
510
492
|
Together.Completions = completions_1.Completions;
|
|
511
493
|
Together.Embeddings = embeddings_1.Embeddings;
|
|
512
494
|
Together.Files = files_1.Files;
|
|
513
|
-
Together.
|
|
495
|
+
Together.FineTuning = fine_tuning_1.FineTuning;
|
|
514
496
|
Together.CodeInterpreter = code_interpreter_1.CodeInterpreter;
|
|
515
497
|
Together.Images = images_1.Images;
|
|
516
498
|
Together.Videos = videos_1.Videos;
|
|
@@ -519,6 +501,7 @@ Together.Models = models_1.Models;
|
|
|
519
501
|
Together.Jobs = jobs_1.Jobs;
|
|
520
502
|
Together.Endpoints = endpoints_1.Endpoints;
|
|
521
503
|
Together.Hardware = hardware_1.Hardware;
|
|
504
|
+
Together.Rerank = rerank_1.Rerank;
|
|
522
505
|
Together.Batches = batches_1.Batches;
|
|
523
506
|
Together.Evals = evals_1.Evals;
|
|
524
507
|
//# sourceMappingURL=client.js.map
|