langsmith 0.4.7 → 0.4.8
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/dist/client.cjs +10 -2
- package/dist/client.d.ts +1 -0
- package/dist/client.js +10 -2
- package/dist/experimental/anthropic/index.cjs +969 -0
- package/dist/experimental/anthropic/index.d.ts +30 -0
- package/dist/experimental/anthropic/index.js +966 -0
- package/dist/experimental/anthropic/types.cjs +2 -0
- package/dist/experimental/anthropic/types.d.ts +37 -0
- package/dist/experimental/anthropic/types.js +1 -0
- package/dist/experimental/anthropic/utils.cjs +10 -0
- package/dist/experimental/anthropic/utils.d.ts +1 -0
- package/dist/experimental/anthropic/utils.js +7 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/traceable.cjs +38 -4
- package/dist/traceable.d.ts +4 -0
- package/dist/traceable.js +38 -4
- package/dist/wrappers/gemini.cjs +434 -0
- package/dist/wrappers/gemini.d.ts +46 -0
- package/dist/wrappers/gemini.js +431 -0
- package/package.json +3 -1
package/dist/client.cjs
CHANGED
|
@@ -429,6 +429,12 @@ class Client {
|
|
|
429
429
|
writable: true,
|
|
430
430
|
value: false
|
|
431
431
|
});
|
|
432
|
+
Object.defineProperty(this, "_runCompressionDisabled", {
|
|
433
|
+
enumerable: true,
|
|
434
|
+
configurable: true,
|
|
435
|
+
writable: true,
|
|
436
|
+
value: (0, env_js_1.getLangSmithEnvironmentVariable)("DISABLE_RUN_COMPRESSION") === "true"
|
|
437
|
+
});
|
|
432
438
|
Object.defineProperty(this, "debug", {
|
|
433
439
|
enumerable: true,
|
|
434
440
|
configurable: true,
|
|
@@ -806,7 +812,8 @@ class Client {
|
|
|
806
812
|
const useMultipart = !this._multipartDisabled &&
|
|
807
813
|
(serverInfo?.batch_ingest_config?.use_multipart_endpoint ?? true);
|
|
808
814
|
if (useMultipart) {
|
|
809
|
-
const useGzip =
|
|
815
|
+
const useGzip = !this._runCompressionDisabled &&
|
|
816
|
+
serverInfo?.instance_flags?.gzip_body_enabled;
|
|
810
817
|
try {
|
|
811
818
|
await this.multipartIngestRuns(ingestParams, {
|
|
812
819
|
...options,
|
|
@@ -2187,7 +2194,8 @@ class Client {
|
|
|
2187
2194
|
async uploadCsv({ csvFile, fileName, inputKeys, outputKeys, description, dataType, name, }) {
|
|
2188
2195
|
const url = `${this.apiUrl}/datasets/upload`;
|
|
2189
2196
|
const formData = new FormData();
|
|
2190
|
-
|
|
2197
|
+
const csvBlob = new Blob([csvFile], { type: "text/csv" });
|
|
2198
|
+
formData.append("file", csvBlob, fileName);
|
|
2191
2199
|
inputKeys.forEach((key) => {
|
|
2192
2200
|
formData.append("input_keys", key);
|
|
2193
2201
|
});
|
package/dist/client.d.ts
CHANGED
|
@@ -378,6 +378,7 @@ export declare class Client implements LangSmithTracingClientInterface {
|
|
|
378
378
|
private get _fetch();
|
|
379
379
|
private multipartStreamingDisabled;
|
|
380
380
|
private _multipartDisabled;
|
|
381
|
+
private _runCompressionDisabled;
|
|
381
382
|
debug: boolean;
|
|
382
383
|
constructor(config?: ClientConfig);
|
|
383
384
|
static getDefaultClientConfig(): {
|
package/dist/client.js
CHANGED
|
@@ -391,6 +391,12 @@ export class Client {
|
|
|
391
391
|
writable: true,
|
|
392
392
|
value: false
|
|
393
393
|
});
|
|
394
|
+
Object.defineProperty(this, "_runCompressionDisabled", {
|
|
395
|
+
enumerable: true,
|
|
396
|
+
configurable: true,
|
|
397
|
+
writable: true,
|
|
398
|
+
value: getLangSmithEnvironmentVariable("DISABLE_RUN_COMPRESSION") === "true"
|
|
399
|
+
});
|
|
394
400
|
Object.defineProperty(this, "debug", {
|
|
395
401
|
enumerable: true,
|
|
396
402
|
configurable: true,
|
|
@@ -768,7 +774,8 @@ export class Client {
|
|
|
768
774
|
const useMultipart = !this._multipartDisabled &&
|
|
769
775
|
(serverInfo?.batch_ingest_config?.use_multipart_endpoint ?? true);
|
|
770
776
|
if (useMultipart) {
|
|
771
|
-
const useGzip =
|
|
777
|
+
const useGzip = !this._runCompressionDisabled &&
|
|
778
|
+
serverInfo?.instance_flags?.gzip_body_enabled;
|
|
772
779
|
try {
|
|
773
780
|
await this.multipartIngestRuns(ingestParams, {
|
|
774
781
|
...options,
|
|
@@ -2149,7 +2156,8 @@ export class Client {
|
|
|
2149
2156
|
async uploadCsv({ csvFile, fileName, inputKeys, outputKeys, description, dataType, name, }) {
|
|
2150
2157
|
const url = `${this.apiUrl}/datasets/upload`;
|
|
2151
2158
|
const formData = new FormData();
|
|
2152
|
-
|
|
2159
|
+
const csvBlob = new Blob([csvFile], { type: "text/csv" });
|
|
2160
|
+
formData.append("file", csvBlob, fileName);
|
|
2153
2161
|
inputKeys.forEach((key) => {
|
|
2154
2162
|
formData.append("input_keys", key);
|
|
2155
2163
|
});
|