langwatch 0.3.0-prerelease.1 → 0.3.0-prerelease.2
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/chunk-4BZATFKJ.mjs +181 -0
- package/dist/chunk-4BZATFKJ.mjs.map +1 -0
- package/dist/chunk-CSC3CMIT.mjs +118 -0
- package/dist/chunk-CSC3CMIT.mjs.map +1 -0
- package/dist/chunk-F63YKTXA.mjs +47 -0
- package/dist/chunk-F63YKTXA.mjs.map +1 -0
- package/dist/chunk-G3AUABT7.js +4 -0
- package/dist/chunk-G3AUABT7.js.map +1 -0
- package/dist/chunk-HPC6Z7J4.js +118 -0
- package/dist/chunk-HPC6Z7J4.js.map +1 -0
- package/dist/chunk-KGDAENGD.js +50 -0
- package/dist/chunk-KGDAENGD.js.map +1 -0
- package/dist/chunk-LD74LVRU.js +47 -0
- package/dist/chunk-LD74LVRU.js.map +1 -0
- package/dist/chunk-OM7VY3XT.mjs +4 -0
- package/dist/chunk-OM7VY3XT.mjs.map +1 -0
- package/dist/chunk-PCQVQ7SB.js +45 -0
- package/dist/chunk-PCQVQ7SB.js.map +1 -0
- package/dist/chunk-PMBEK6YE.mjs +424 -0
- package/dist/chunk-PMBEK6YE.mjs.map +1 -0
- package/dist/chunk-PR3JDWC3.mjs +50 -0
- package/dist/chunk-PR3JDWC3.mjs.map +1 -0
- package/dist/chunk-PTJ6AAI7.js +360 -0
- package/dist/chunk-PTJ6AAI7.js.map +1 -0
- package/dist/chunk-QEWDG5QE.mjs +45 -0
- package/dist/chunk-QEWDG5QE.mjs.map +1 -0
- package/dist/chunk-REUCVT7A.mjs +39 -0
- package/dist/chunk-REUCVT7A.mjs.map +1 -0
- package/dist/chunk-SVJ7SCGB.js +424 -0
- package/dist/chunk-SVJ7SCGB.js.map +1 -0
- package/dist/chunk-VJSOCNPA.js +181 -0
- package/dist/chunk-VJSOCNPA.js.map +1 -0
- package/dist/chunk-WM2GRSRW.js +39 -0
- package/dist/chunk-WM2GRSRW.js.map +1 -0
- package/dist/chunk-Z5J5UI5E.mjs +360 -0
- package/dist/chunk-Z5J5UI5E.mjs.map +1 -0
- package/dist/client-B2HqIKg6.d.ts +51 -0
- package/dist/client-XyCqclCi.d.mts +51 -0
- package/dist/client-browser.d.mts +8 -0
- package/dist/client-browser.d.ts +8 -0
- package/dist/client-browser.js +83 -0
- package/dist/client-browser.js.map +1 -0
- package/dist/client-browser.mjs +83 -0
- package/dist/client-browser.mjs.map +1 -0
- package/dist/client-node.d.mts +8 -0
- package/dist/client-node.d.ts +8 -0
- package/dist/client-node.js +90 -0
- package/dist/client-node.js.map +1 -0
- package/dist/client-node.mjs +90 -0
- package/dist/client-node.mjs.map +1 -0
- package/dist/evaluation/index.d.mts +897 -0
- package/dist/evaluation/index.d.ts +897 -0
- package/dist/evaluation/index.js +13 -0
- package/dist/evaluation/index.js.map +1 -0
- package/dist/evaluation/index.mjs +13 -0
- package/dist/evaluation/index.mjs.map +1 -0
- package/dist/filterable-batch-span-processor-zO5kcjBY.d.mts +64 -0
- package/dist/filterable-batch-span-processor-zO5kcjBY.d.ts +64 -0
- package/dist/index.d.mts +48 -0
- package/{src/observability/exporters/langwatch-exporter.ts → dist/index.d.ts} +13 -18
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +30 -0
- package/dist/index.mjs.map +1 -0
- package/dist/observability/index.d.mts +260 -0
- package/dist/observability/index.d.ts +260 -0
- package/dist/observability/index.js +20 -0
- package/dist/observability/index.js.map +1 -0
- package/dist/observability/index.mjs +20 -0
- package/dist/observability/index.mjs.map +1 -0
- package/dist/observability/instrumentation/langchain/index.d.mts +40 -0
- package/dist/observability/instrumentation/langchain/index.d.ts +40 -0
- package/dist/observability/instrumentation/langchain/index.js +666 -0
- package/dist/observability/instrumentation/langchain/index.js.map +1 -0
- package/dist/observability/instrumentation/langchain/index.mjs +666 -0
- package/dist/observability/instrumentation/langchain/index.mjs.map +1 -0
- package/dist/prompt/index.d.mts +10 -0
- package/dist/prompt/index.d.ts +10 -0
- package/dist/prompt/index.js +18 -0
- package/dist/prompt/index.js.map +1 -0
- package/dist/prompt/index.mjs +18 -0
- package/dist/prompt/index.mjs.map +1 -0
- package/dist/prompt-BXJWdbQp.d.mts +1967 -0
- package/dist/prompt-BXJWdbQp.d.ts +1967 -0
- package/dist/record-evaluation-CmxMXa-3.d.mts +25 -0
- package/dist/record-evaluation-CmxMXa-3.d.ts +25 -0
- package/dist/trace-D-bZOuqb.d.mts +622 -0
- package/dist/trace-G2312klE.d.ts +622 -0
- package/package.json +9 -4
- package/.editorconfig +0 -16
- package/.eslintrc.cjs +0 -37
- package/copy-types.sh +0 -28
- package/examples/langchain/.env.example +0 -2
- package/examples/langchain/README.md +0 -42
- package/examples/langchain/package-lock.json +0 -2930
- package/examples/langchain/package.json +0 -27
- package/examples/langchain/src/cli-markdown.d.ts +0 -137
- package/examples/langchain/src/index.ts +0 -109
- package/examples/langchain/tsconfig.json +0 -25
- package/examples/langgraph/.env.example +0 -2
- package/examples/langgraph/README.md +0 -42
- package/examples/langgraph/package-lock.json +0 -3031
- package/examples/langgraph/package.json +0 -28
- package/examples/langgraph/src/cli-markdown.d.ts +0 -137
- package/examples/langgraph/src/index.ts +0 -196
- package/examples/langgraph/tsconfig.json +0 -25
- package/examples/mastra/.env.example +0 -2
- package/examples/mastra/README.md +0 -57
- package/examples/mastra/package-lock.json +0 -5296
- package/examples/mastra/package.json +0 -32
- package/examples/mastra/src/cli-markdown.d.ts +0 -137
- package/examples/mastra/src/index.ts +0 -120
- package/examples/mastra/src/mastra/agents/weather-agent.ts +0 -30
- package/examples/mastra/src/mastra/index.ts +0 -21
- package/examples/mastra/src/mastra/tools/weather-tool.ts +0 -102
- package/examples/mastra/tsconfig.json +0 -25
- package/examples/vercel-ai/.env.example +0 -2
- package/examples/vercel-ai/README.md +0 -38
- package/examples/vercel-ai/package-lock.json +0 -2571
- package/examples/vercel-ai/package.json +0 -27
- package/examples/vercel-ai/src/cli-markdown.d.ts +0 -137
- package/examples/vercel-ai/src/index.ts +0 -110
- package/examples/vercel-ai/src/instrumentation.ts +0 -9
- package/examples/vercel-ai/tsconfig.json +0 -25
- package/src/__tests__/client-browser.test.ts +0 -92
- package/src/__tests__/client-node.test.ts +0 -76
- package/src/__tests__/client.test.ts +0 -71
- package/src/__tests__/integration/client-browser.test.ts +0 -46
- package/src/__tests__/integration/client-node.test.ts +0 -46
- package/src/client-browser.ts +0 -70
- package/src/client-node.ts +0 -82
- package/src/client-shared.ts +0 -72
- package/src/client.ts +0 -119
- package/src/evaluation/__tests__/record-evaluation.test.ts +0 -112
- package/src/evaluation/__tests__/run-evaluation.test.ts +0 -171
- package/src/evaluation/index.ts +0 -2
- package/src/evaluation/record-evaluation.ts +0 -101
- package/src/evaluation/run-evaluation.ts +0 -133
- package/src/evaluation/tracer.ts +0 -3
- package/src/evaluation/types.ts +0 -23
- package/src/index.ts +0 -13
- package/src/internal/api/__tests__/errors.test.ts +0 -98
- package/src/internal/api/client.ts +0 -30
- package/src/internal/api/errors.ts +0 -32
- package/src/internal/generated/openapi/.gitkeep +0 -0
- package/src/internal/generated/types/.gitkeep +0 -0
- package/src/observability/__tests__/integration/base.test.ts +0 -74
- package/src/observability/__tests__/integration/browser-setup-ordering.test.ts +0 -60
- package/src/observability/__tests__/integration/complex-nested-spans.test.ts +0 -29
- package/src/observability/__tests__/integration/error-handling.test.ts +0 -24
- package/src/observability/__tests__/integration/langwatch-disabled-otel.test.ts +0 -24
- package/src/observability/__tests__/integration/langwatch-first-then-vercel.test.ts +0 -24
- package/src/observability/__tests__/integration/multiple-setup-attempts.test.ts +0 -27
- package/src/observability/__tests__/integration/otel-ordering.test.ts +0 -27
- package/src/observability/__tests__/integration/vercel-configurations.test.ts +0 -20
- package/src/observability/__tests__/integration/vercel-first-then-langwatch.test.ts +0 -27
- package/src/observability/__tests__/span.test.ts +0 -214
- package/src/observability/__tests__/trace.test.ts +0 -180
- package/src/observability/exporters/index.ts +0 -1
- package/src/observability/index.ts +0 -4
- package/src/observability/instrumentation/langchain/__tests__/integration/langchain-chatbot.test.ts +0 -112
- package/src/observability/instrumentation/langchain/__tests__/langchain.test.ts +0 -284
- package/src/observability/instrumentation/langchain/index.ts +0 -624
- package/src/observability/processors/__tests__/filterable-batch-span-exporter.test.ts +0 -98
- package/src/observability/processors/filterable-batch-span-processor.ts +0 -99
- package/src/observability/processors/index.ts +0 -1
- package/src/observability/semconv/attributes.ts +0 -185
- package/src/observability/semconv/events.ts +0 -42
- package/src/observability/semconv/index.ts +0 -16
- package/src/observability/semconv/values.ts +0 -159
- package/src/observability/span.ts +0 -728
- package/src/observability/trace.ts +0 -301
- package/src/prompt/__tests__/prompt.test.ts +0 -139
- package/src/prompt/get-prompt-version.ts +0 -49
- package/src/prompt/get-prompt.ts +0 -44
- package/src/prompt/index.ts +0 -3
- package/src/prompt/prompt.ts +0 -133
- package/src/prompt/service.ts +0 -221
- package/src/prompt/tracer.ts +0 -3
- package/src/prompt/types.ts +0 -0
- package/ts-to-zod.config.js +0 -35
- package/tsconfig.json +0 -26
- package/tsup.config.ts +0 -20
- package/vitest.config.ts +0 -9
package/src/prompt/service.ts
DELETED
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createLangWatchApiClient,
|
|
3
|
-
type LangwatchApiClient,
|
|
4
|
-
} from "../internal/api/client";
|
|
5
|
-
import type { paths } from "../internal/generated/openapi/api-client";
|
|
6
|
-
import { Prompt } from "./prompt";
|
|
7
|
-
|
|
8
|
-
// Extract types directly from OpenAPI schema for strong type safety.
|
|
9
|
-
type CreatePromptBody = NonNullable<
|
|
10
|
-
paths["/api/prompts"]["post"]["requestBody"]
|
|
11
|
-
>["content"]["application/json"];
|
|
12
|
-
type UpdatePromptBody = NonNullable<
|
|
13
|
-
paths["/api/prompts/{id}"]["put"]["requestBody"]
|
|
14
|
-
>["content"]["application/json"];
|
|
15
|
-
type CreateVersionBody = NonNullable<
|
|
16
|
-
paths["/api/prompts/{id}/versions"]["post"]["requestBody"]
|
|
17
|
-
>["content"]["application/json"];
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Custom error class for Prompts API operations.
|
|
21
|
-
* Provides context about the failed operation and the original error.
|
|
22
|
-
*/
|
|
23
|
-
export class PromptsError extends Error {
|
|
24
|
-
constructor(
|
|
25
|
-
message: string,
|
|
26
|
-
public readonly operation: string,
|
|
27
|
-
public readonly originalError?: any,
|
|
28
|
-
) {
|
|
29
|
-
super(message);
|
|
30
|
-
this.name = "PromptsError";
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
interface PromptServiceOptions {
|
|
35
|
-
client?: LangwatchApiClient;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Service for managing prompt resources via the Langwatch API.
|
|
40
|
-
*
|
|
41
|
-
* Responsibilities:
|
|
42
|
-
* - CRUD operations for prompts
|
|
43
|
-
* - Creating prompt versions
|
|
44
|
-
* - Error handling with contextual information
|
|
45
|
-
*
|
|
46
|
-
* All methods return Prompt instances, which encapsulate prompt data and template logic.
|
|
47
|
-
*/
|
|
48
|
-
export class PromptService {
|
|
49
|
-
private client: LangwatchApiClient;
|
|
50
|
-
private static instance: PromptService | null = null;
|
|
51
|
-
|
|
52
|
-
constructor(opts?: PromptServiceOptions) {
|
|
53
|
-
this.client = opts?.client ?? createLangWatchApiClient();
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Gets the singleton instance of PromptService.
|
|
58
|
-
* Creates the instance lazily on first access.
|
|
59
|
-
*/
|
|
60
|
-
public static getInstance(): PromptService {
|
|
61
|
-
if (!PromptService.instance) {
|
|
62
|
-
PromptService.instance = new PromptService();
|
|
63
|
-
}
|
|
64
|
-
return PromptService.instance;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Resets the singleton instance. Primarily used for testing.
|
|
69
|
-
*/
|
|
70
|
-
public static resetInstance(): void {
|
|
71
|
-
PromptService.instance = null;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Handles API errors by throwing a PromptsError with operation context.
|
|
76
|
-
* @param operation Description of the operation being performed.
|
|
77
|
-
* @param error The error object returned from the API client.
|
|
78
|
-
* @throws {PromptsError}
|
|
79
|
-
*/
|
|
80
|
-
private handleApiError(operation: string, error: any): never {
|
|
81
|
-
const errorMessage =
|
|
82
|
-
typeof error === "string"
|
|
83
|
-
? error
|
|
84
|
-
: error?.error ?? error?.message ?? "Unknown error occurred";
|
|
85
|
-
throw new PromptsError(
|
|
86
|
-
`Failed to ${operation}: ${errorMessage}`,
|
|
87
|
-
operation,
|
|
88
|
-
error,
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Fetches all prompts from the API.
|
|
94
|
-
* @returns Array of Prompt instances.
|
|
95
|
-
* @throws {PromptsError} If the API call fails.
|
|
96
|
-
*/
|
|
97
|
-
async getAll(): Promise<Prompt[]> {
|
|
98
|
-
const { data, error } = await this.client.GET("/api/prompts");
|
|
99
|
-
if (error) this.handleApiError("fetch all prompts", error);
|
|
100
|
-
return data.map((promptData) => new Prompt(promptData));
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Fetches a single prompt by its ID.
|
|
105
|
-
* @param id The prompt's unique identifier.
|
|
106
|
-
* @returns The Prompt instance.
|
|
107
|
-
* @throws {PromptsError} If the API call fails.
|
|
108
|
-
*/
|
|
109
|
-
async get(id: string): Promise<Prompt> {
|
|
110
|
-
const { data, error } = await this.client.GET("/api/prompts/{id}", {
|
|
111
|
-
params: { path: { id } },
|
|
112
|
-
});
|
|
113
|
-
if (error) this.handleApiError(`fetch prompt with ID "${id}"`, error);
|
|
114
|
-
return new Prompt(data);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Creates a new prompt.
|
|
119
|
-
* @param params The prompt creation payload, matching the OpenAPI schema.
|
|
120
|
-
* @returns The created Prompt instance.
|
|
121
|
-
* @throws {PromptsError} If the API call fails.
|
|
122
|
-
*/
|
|
123
|
-
async create(params: CreatePromptBody): Promise<Prompt> {
|
|
124
|
-
const { data, error } = await this.client.POST("/api/prompts", {
|
|
125
|
-
body: params,
|
|
126
|
-
});
|
|
127
|
-
if (error) this.handleApiError("create prompt", error);
|
|
128
|
-
return new Prompt(data);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Updates an existing prompt.
|
|
133
|
-
* @param id The prompt's unique identifier.
|
|
134
|
-
* @param params The update payload, matching the OpenAPI schema.
|
|
135
|
-
* @returns The updated Prompt instance.
|
|
136
|
-
* @throws {PromptsError} If the API call fails.
|
|
137
|
-
* @remarks
|
|
138
|
-
* The API does not return the updated prompt directly, so this method fetches it after updating.
|
|
139
|
-
*/
|
|
140
|
-
async update(id: string, params: UpdatePromptBody): Promise<Prompt> {
|
|
141
|
-
const { error } = await this.client.PUT("/api/prompts/{id}", {
|
|
142
|
-
params: { path: { id } },
|
|
143
|
-
body: params,
|
|
144
|
-
});
|
|
145
|
-
if (error) this.handleApiError(`update prompt with ID "${id}"`, error);
|
|
146
|
-
// TODO: This is a workaround to get the updated prompt. It would be better to return the updated prompt directly.
|
|
147
|
-
return await this.get(id);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Deletes a prompt by its ID.
|
|
152
|
-
* @param id The prompt's unique identifier.
|
|
153
|
-
* @throws {PromptsError} If the API call fails.
|
|
154
|
-
*/
|
|
155
|
-
async delete(id: string): Promise<void> {
|
|
156
|
-
const { error } = await this.client.DELETE("/api/prompts/{id}", {
|
|
157
|
-
params: { path: { id } },
|
|
158
|
-
});
|
|
159
|
-
if (error) this.handleApiError(`delete prompt with ID "${id}"`, error);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Fetches all versions for a given prompt.
|
|
164
|
-
* @param id The prompt's unique identifier.
|
|
165
|
-
* @throws {PromptsError} If the API call fails.
|
|
166
|
-
*/
|
|
167
|
-
async getVersions(
|
|
168
|
-
id: string,
|
|
169
|
-
): Promise<Record<string, Prompt>> {
|
|
170
|
-
const { data, error } = await this.client.GET(
|
|
171
|
-
"/api/prompts/{id}/versions",
|
|
172
|
-
{
|
|
173
|
-
params: { path: { id } },
|
|
174
|
-
},
|
|
175
|
-
);
|
|
176
|
-
if (error)
|
|
177
|
-
this.handleApiError(`fetch versions for prompt with ID "${id}"`, error);
|
|
178
|
-
|
|
179
|
-
const prompts: Record<string, Prompt> = {};
|
|
180
|
-
const dataTypeCorrected = data as unknown as NonNullable<
|
|
181
|
-
paths["/api/prompts/{id}/versions"]["get"]["responses"]["200"]["content"]["application/json"]
|
|
182
|
-
>[];
|
|
183
|
-
|
|
184
|
-
for (const version of dataTypeCorrected) {
|
|
185
|
-
prompts[version.id] = new Prompt({
|
|
186
|
-
id: version.configId,
|
|
187
|
-
messages: version.configData.messages,
|
|
188
|
-
model: version.configData.model,
|
|
189
|
-
prompt: version.configData.prompt,
|
|
190
|
-
response_format: null,
|
|
191
|
-
name: `Prompt ${version.configId}@${version.id}`,
|
|
192
|
-
updatedAt: version.createdAt,
|
|
193
|
-
version: version.configData.version ?? 0,
|
|
194
|
-
versionCreatedAt: version.createdAt,
|
|
195
|
-
versionId: version.id,
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
return prompts;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Creates a new version for a given prompt.
|
|
204
|
-
* @param id The prompt's unique identifier.
|
|
205
|
-
* @param params The version creation payload, matching the OpenAPI schema.
|
|
206
|
-
* @returns The updated Prompt instance.
|
|
207
|
-
* @throws {PromptsError} If the API call fails.
|
|
208
|
-
* @remarks
|
|
209
|
-
* The API does not return the updated prompt directly, so this method fetches it after creation.
|
|
210
|
-
*/
|
|
211
|
-
async createVersion(id: string, params: CreateVersionBody): Promise<Prompt> {
|
|
212
|
-
const { error } = await this.client.POST("/api/prompts/{id}/versions", {
|
|
213
|
-
params: { path: { id } },
|
|
214
|
-
body: params,
|
|
215
|
-
});
|
|
216
|
-
if (error)
|
|
217
|
-
this.handleApiError(`create version for prompt with ID "${id}"`, error);
|
|
218
|
-
// TODO: This is a workaround to get the updated prompt. It would be better to return the updated prompt directly.
|
|
219
|
-
return await this.get(id);
|
|
220
|
-
}
|
|
221
|
-
}
|
package/src/prompt/tracer.ts
DELETED
package/src/prompt/types.ts
DELETED
|
File without changes
|
package/ts-to-zod.config.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ts-to-zod configuration.
|
|
3
|
-
*
|
|
4
|
-
* @type {import("ts-to-zod").TsToZodConfig}
|
|
5
|
-
*/
|
|
6
|
-
module.exports = {
|
|
7
|
-
input: "server/tracer/types.ts",
|
|
8
|
-
output: "server/tracer/types.zod.ts",
|
|
9
|
-
nameFilter: (name) =>
|
|
10
|
-
![
|
|
11
|
-
"ElasticSearchSpan",
|
|
12
|
-
"ElasticSearchInputOutput",
|
|
13
|
-
"EvaluatorDefinition",
|
|
14
|
-
"TraceCheckJob",
|
|
15
|
-
"AnalyticsMetric",
|
|
16
|
-
"NewDatasetEntries",
|
|
17
|
-
"EvaluationRESTParams",
|
|
18
|
-
"EvaluationRESTResult",
|
|
19
|
-
"Json",
|
|
20
|
-
"Literal",
|
|
21
|
-
"DatasetSpan",
|
|
22
|
-
"LLMModeTrace",
|
|
23
|
-
"ReservedSpanParams",
|
|
24
|
-
"SpanParams",
|
|
25
|
-
"ReservedTraceMetadataMapping",
|
|
26
|
-
"CustomMetadata",
|
|
27
|
-
"TraceMetadata",
|
|
28
|
-
"Event",
|
|
29
|
-
"ElasticSearchEvent",
|
|
30
|
-
"TrackEventRESTParamsValidator",
|
|
31
|
-
"Trace",
|
|
32
|
-
"ElasticSearchTrace",
|
|
33
|
-
"CollectorRESTParams",
|
|
34
|
-
].includes(name),
|
|
35
|
-
};
|
package/tsconfig.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "es2017",
|
|
4
|
-
"module": "NodeNext",
|
|
5
|
-
"declaration": true,
|
|
6
|
-
"declarationMap": true,
|
|
7
|
-
"outDir": "./dist",
|
|
8
|
-
"strict": true,
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"resolveJsonModule": true,
|
|
11
|
-
"allowJs": true,
|
|
12
|
-
"checkJs": true,
|
|
13
|
-
"skipLibCheck": true,
|
|
14
|
-
"forceConsistentCasingInFileNames": true,
|
|
15
|
-
"moduleResolution": "nodenext",
|
|
16
|
-
"isolatedModules": true,
|
|
17
|
-
"jsx": "preserve",
|
|
18
|
-
"incremental": true,
|
|
19
|
-
"noUncheckedIndexedAccess": true,
|
|
20
|
-
"tsBuildInfoFile": "./tsconfig.tsbuildinfo"
|
|
21
|
-
},
|
|
22
|
-
"include": [
|
|
23
|
-
"**/*.ts",
|
|
24
|
-
],
|
|
25
|
-
"exclude": ["node_modules", "./dist/**/*", "./example/**/*", "./examples/**/*"]
|
|
26
|
-
}
|
package/tsup.config.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "tsup";
|
|
2
|
-
|
|
3
|
-
export default defineConfig([
|
|
4
|
-
{
|
|
5
|
-
entry: [
|
|
6
|
-
"src/index.ts",
|
|
7
|
-
"src/observability/index.ts",
|
|
8
|
-
"src/observability/instrumentation/langchain/index.ts",
|
|
9
|
-
"src/prompt/index.ts",
|
|
10
|
-
"src/evaluation/index.ts",
|
|
11
|
-
"src/client-node.ts",
|
|
12
|
-
"src/client-browser.ts",
|
|
13
|
-
],
|
|
14
|
-
splitting: true,
|
|
15
|
-
clean: true,
|
|
16
|
-
format: ["cjs", "esm"],
|
|
17
|
-
dts: true,
|
|
18
|
-
sourcemap: true,
|
|
19
|
-
},
|
|
20
|
-
]);
|