@gammatech/aijsx 0.8.1-dev.2024-05-24 → 0.9.0-dev.2024-05-28

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/index.d.mts CHANGED
@@ -1,13 +1,46 @@
1
- import { R as RenderContext, L as LogImplementation, S as SpanProcessor, C as ContextValues, a as Context, A as AINode, T as Tracer, b as ReadableSpan, c as SpanExporter, d as AIComponent, e as SpanAttributes, P as Prompt, f as ChatCompletionRequestPayloads, g as RenderedConversationMessage, E as EvaluatorResult, h as EvaluatorFn, i as PromptParsed, N as NotAsyncGenerator, F as FunctionChain, j as StreamChain, k as ChatCompletionClientAndProvider, J as JSX } from './jsx-dev-runtime-Kh2H5_Cf.mjs';
2
- export { I as AIElement, m as AIFragment, q as AssistantMessage, B as BoundLogger, s as ChatCompletionError, o as ChatCompletionRole, z as CombinedLogger, y as ConsoleLogger, D as Literal, t as LogChatCompletionRequest, u as LogChatCompletionResponse, v as LogLevel, w as Logger, x as NoopLogImplementation, _ as OutputParser, M as PropsOfAIComponent, G as RenderResult, K as Renderable, V as Span, O as SpanContext, W as SpanEvent, Q as SpanStatus, p as SystemMessage, Y as TracingContext, X as TracingContextKey, Z as TracingContextManager, U as UserMessage, H as attachedContextSymbol, r as computeUsage, l as createAIElement, n as createContext } from './jsx-dev-runtime-Kh2H5_Cf.mjs';
1
+ import { L as LogChatCompletionRequest, A as AINode, C as ChatMessage, R as RenderContext, a as LogImplementation, S as SpanProcessor, b as ContextValues, c as Context, T as Tracer, d as ReadableSpan, e as SpanExporter, f as AIComponent, g as SpanAttributes, P as Prompt, h as ChatCompletionRequestPayloads, D as DebugMessage, E as EvaluatorResult, i as EvaluatorFn, j as PromptParsed, N as NotAsyncGenerator, F as FunctionChain, k as StreamChain, J as JSX } from './jsx-dev-runtime-uCZBuaDe.mjs';
2
+ export { G as AIElement, m as AIFragment, B as BoundLogger, o as ChatRole, w as CombinedLogger, v as ConsoleLogger, I as ImagePart, p as ImagePartProps, x as Literal, q as LogChatCompletionResponse, r as LogLevel, s as Logger, u as NoopLogImplementation, Y as OutputParser, K as PropsOfAIComponent, y as RenderResult, H as Renderable, Q as Span, M as SpanContext, U as SpanEvent, O as SpanStatus, W as TracingContext, V as TracingContextKey, X as TracingContextManager, z as attachedContextSymbol, l as createAIElement, n as createContext, t as toDebugMessage } from './jsx-dev-runtime-uCZBuaDe.mjs';
3
3
  import { ZodObject, ZodRawShape, ZodTypeAny, ZodString, z } from 'zod';
4
4
  import { OpenAI } from 'openai';
5
5
  export { OpenAI as OpenAIClient } from 'openai';
6
6
  import { ChatCompletionSystemMessageParam, ChatCompletionUserMessageParam, ChatCompletionAssistantMessageParam, ChatCompletionCreateParams } from 'openai/resources';
7
7
  import AnthropicClient from '@anthropic-ai/sdk';
8
8
  export { default as AnthropicClient } from '@anthropic-ai/sdk';
9
- import { ImageBlockParam } from '@anthropic-ai/sdk/resources';
10
- export { countTokens as countAnthropicTokens } from '@anthropic-ai/tokenizer';
9
+
10
+ declare class ChatCompletionError extends Error {
11
+ readonly chatCompletionRequest: LogChatCompletionRequest;
12
+ readonly status: number | undefined;
13
+ readonly shouldRetry: boolean;
14
+ readonly name = "ChatCompletionError";
15
+ constructor(message: string, chatCompletionRequest: LogChatCompletionRequest, status: number | undefined, shouldRetry?: boolean);
16
+ }
17
+
18
+ declare const SystemMessage: (props: {
19
+ children: AINode;
20
+ }) => AINode;
21
+ declare const UserMessage: (props: {
22
+ children: AINode;
23
+ }) => AINode;
24
+ declare const AssistantMessage: (props: {
25
+ children: AINode;
26
+ }) => AINode;
27
+
28
+ type TokenizerFn = (message: ChatMessage) => number;
29
+ declare const computeUsage: (messages: ChatMessage[], tokenizer: TokenizerFn) => {
30
+ prompt: number;
31
+ completion: number;
32
+ total: number;
33
+ };
34
+
35
+ type ChatCompletionClientAndProvider<K> = {
36
+ client: K;
37
+ provider?: string;
38
+ providerRegion?: string;
39
+ costFn?: (model: string, usage: {
40
+ prompt: number;
41
+ completion: number;
42
+ }) => number;
43
+ };
11
44
 
12
45
  type CreateRenderContextOptions = {
13
46
  logger?: LogImplementation;
@@ -129,7 +162,7 @@ declare namespace AISpanAttributes {
129
162
  retryCount?: number;
130
163
  requestType: K;
131
164
  chatCompletionRequest: ChatCompletionRequestPayloads[K];
132
- inputMessages: RenderedConversationMessage[];
165
+ inputMessages: DebugMessage[];
133
166
  finishReason: string | null;
134
167
  output: string;
135
168
  tokensUsed: Usage;
@@ -138,7 +171,6 @@ declare namespace AISpanAttributes {
138
171
  declare namespace ProcessedAISpanAttributes {
139
172
  type Prompt = AISpanAttributes.Prompt & {
140
173
  prompt: never;
141
- evaluators: EvaluatorResult[];
142
174
  evaluatorResults: Record<string, EvaluatorResult>;
143
175
  evaluatorError?: string;
144
176
  totalUsage?: Usage;
@@ -201,7 +233,8 @@ declare module '@gammatech/aijsx' {
201
233
  openai: OpenAIChatCompletionRequest;
202
234
  }
203
235
  }
204
- type ValidOpenAIChatModel = 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo' | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-4-1106-preview' | 'gpt-4-0125-preview' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-16k-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-0125';
236
+ type ValidOpenAIVisionModel = 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo' | 'gpt-4-vision-preview';
237
+ type ValidOpenAIChatModel = ValidOpenAIVisionModel | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-4-1106-preview' | 'gpt-4-0125-preview' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-16k-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-0125';
205
238
  declare const OpenAIClientContext: Context<() => ChatCompletionClientAndProvider<OpenAI>>;
206
239
  type OpenAIChatCompletionProps = {
207
240
  model: ValidOpenAIChatModel;
@@ -214,33 +247,7 @@ type OpenAIChatCompletionProps = {
214
247
  };
215
248
  declare function OpenAIChatCompletion(props: OpenAIChatCompletionProps, ctx: RenderContext): AINode;
216
249
 
217
- type ValidOpenAIVisionModel = 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo' | 'gpt-4-vision-preview';
218
- declare const ContentTypeImage: (_props: {
219
- url: string;
220
- dimensions?: {
221
- width: number;
222
- height: number;
223
- };
224
- detail?: 'auto' | 'high' | 'low';
225
- }) => null;
226
- type OpenAIVisionChatCompletionProps = {
227
- model?: ValidOpenAIVisionModel;
228
- maxTokens?: number;
229
- stop?: string | string[];
230
- temperature?: number;
231
- maxRetries?: number;
232
- children: AINode;
233
- };
234
- declare function OpenAIVisionChatCompletion(props: OpenAIVisionChatCompletionProps, ctx: RenderContext): AINode;
235
- declare function OpenAIVisionChatCompletionInner(props: OpenAIVisionChatCompletionProps, { logger, render, tracer, getContext }: RenderContext): AsyncGenerator<string, void, unknown>;
236
-
237
- declare const tokenizer: {
238
- encode: (text: string) => number[];
239
- decode: (tokens: number[]) => string;
240
- };
241
- declare function tokenLimitForChatModel(model: ValidOpenAIChatModel): number | undefined;
242
- declare function tokenCountForOpenAIMessage(message: OpenAIChatMessage): number;
243
- declare function tokenCountForOpenAIVisionMessage(message: OpenAIChatMessage): number;
250
+ declare const openaiTokenizer: TokenizerFn;
244
251
 
245
252
  type AnthropicChatCompletionRequest = AnthropicClient.Messages.MessageStreamParams;
246
253
  declare module '@gammatech/aijsx' {
@@ -263,23 +270,7 @@ type AnthropicChatCompletionProps = {
263
270
  children: AINode;
264
271
  };
265
272
  declare function AnthropicChatCompletion(props: AnthropicChatCompletionProps, ctx: RenderContext): JSX.Element;
266
- /**
267
- * An AI.JSX component that invokes an Anthropic Large Language Model.
268
- * @param children The children to render.
269
- * @param chatModel The chat model to use.
270
- * @param completionModel The completion model to use.
271
- * @param client The Anthropic client.
272
- */
273
- declare function AnthropicChatCompletionInner(props: AnthropicChatCompletionProps, { render, logger, tracer, getContext }: RenderContext): AsyncGenerator<string, void, unknown>;
274
273
 
275
- type ClaudeImageBlockBase64 = {
276
- data: string;
277
- mediaType: ImageBlockParam.Source['media_type'];
278
- };
279
- type ClaudeImageBlockUrl = {
280
- url: string;
281
- };
282
- type ClaudeImageBlockProps = ClaudeImageBlockBase64 | ClaudeImageBlockUrl;
283
- declare const ClaudeImageBlock: (props: ClaudeImageBlockProps) => Promise<JSX.Element>;
274
+ declare const anthropicTokenizer: TokenizerFn;
284
275
 
285
- export { AIComponent, AINode, AISpanAttributes, AISpanProcessor, AnthropicChatCompletion, AnthropicChatCompletionInner, type AnthropicChatCompletionRequest, AnthropicClientContext, ChatCompletionClientAndProvider, type ChatCompletionRequestPayloads, ClaudeImageBlock, ContentTypeImage, Context, type CostFn, DefaultMaxRetriesContext, EnrichingSpanProcessor, EvaluatorFn, EvaluatorResult, Fallback, FunctionChain, LogImplementation, NotAsyncGenerator, OpenAIChatCompletion, type OpenAIChatCompletionRequest, type OpenAIChatMessage, OpenAIClientContext, OpenAIVisionChatCompletion, OpenAIVisionChatCompletionInner, ParseVariablesError, ProcessedAISpanAttributes, type Prompt, PromptInvalidOutputError, PromptParsed, ReadableSpan, RenderContext, RenderedConversationMessage, Retry, RetryCountContext, SpanAttributes, SpanExporter, SpanProcessor, StreamChain, Trace, Tracer, type ValidAnthropicChatModel, type ValidOpenAIChatModel, type ValidOpenAIVisionModel, createFunctionChain, createPrompt, createRenderContext, createStreamChain, evaluatePrompt, tokenCountForOpenAIMessage, tokenCountForOpenAIVisionMessage, tokenLimitForChatModel, tokenizer, tracing };
276
+ export { AIComponent, AINode, AISpanAttributes, AISpanProcessor, AnthropicChatCompletion, type AnthropicChatCompletionRequest, AnthropicClientContext, AssistantMessage, type ChatCompletionClientAndProvider, ChatCompletionError, type ChatCompletionRequestPayloads, ChatMessage, Context, type CostFn, DebugMessage, DefaultMaxRetriesContext, EnrichingSpanProcessor, EvaluatorFn, EvaluatorResult, Fallback, FunctionChain, LogChatCompletionRequest, LogImplementation, NotAsyncGenerator, OpenAIChatCompletion, type OpenAIChatCompletionRequest, type OpenAIChatMessage, OpenAIClientContext, ParseVariablesError, ProcessedAISpanAttributes, type Prompt, PromptInvalidOutputError, PromptParsed, ReadableSpan, RenderContext, Retry, RetryCountContext, SpanAttributes, SpanExporter, SpanProcessor, StreamChain, SystemMessage, type TokenizerFn, Trace, Tracer, UserMessage, type ValidAnthropicChatModel, type ValidOpenAIChatModel, type ValidOpenAIVisionModel, anthropicTokenizer, computeUsage, createFunctionChain, createPrompt, createRenderContext, createStreamChain, evaluatePrompt, openaiTokenizer, tracing };
package/dist/index.d.ts CHANGED
@@ -1,13 +1,46 @@
1
- import { R as RenderContext, L as LogImplementation, S as SpanProcessor, C as ContextValues, a as Context, A as AINode, T as Tracer, b as ReadableSpan, c as SpanExporter, d as AIComponent, e as SpanAttributes, P as Prompt, f as ChatCompletionRequestPayloads, g as RenderedConversationMessage, E as EvaluatorResult, h as EvaluatorFn, i as PromptParsed, N as NotAsyncGenerator, F as FunctionChain, j as StreamChain, k as ChatCompletionClientAndProvider, J as JSX } from './jsx-dev-runtime-Kh2H5_Cf.js';
2
- export { I as AIElement, m as AIFragment, q as AssistantMessage, B as BoundLogger, s as ChatCompletionError, o as ChatCompletionRole, z as CombinedLogger, y as ConsoleLogger, D as Literal, t as LogChatCompletionRequest, u as LogChatCompletionResponse, v as LogLevel, w as Logger, x as NoopLogImplementation, _ as OutputParser, M as PropsOfAIComponent, G as RenderResult, K as Renderable, V as Span, O as SpanContext, W as SpanEvent, Q as SpanStatus, p as SystemMessage, Y as TracingContext, X as TracingContextKey, Z as TracingContextManager, U as UserMessage, H as attachedContextSymbol, r as computeUsage, l as createAIElement, n as createContext } from './jsx-dev-runtime-Kh2H5_Cf.js';
1
+ import { L as LogChatCompletionRequest, A as AINode, C as ChatMessage, R as RenderContext, a as LogImplementation, S as SpanProcessor, b as ContextValues, c as Context, T as Tracer, d as ReadableSpan, e as SpanExporter, f as AIComponent, g as SpanAttributes, P as Prompt, h as ChatCompletionRequestPayloads, D as DebugMessage, E as EvaluatorResult, i as EvaluatorFn, j as PromptParsed, N as NotAsyncGenerator, F as FunctionChain, k as StreamChain, J as JSX } from './jsx-dev-runtime-uCZBuaDe.js';
2
+ export { G as AIElement, m as AIFragment, B as BoundLogger, o as ChatRole, w as CombinedLogger, v as ConsoleLogger, I as ImagePart, p as ImagePartProps, x as Literal, q as LogChatCompletionResponse, r as LogLevel, s as Logger, u as NoopLogImplementation, Y as OutputParser, K as PropsOfAIComponent, y as RenderResult, H as Renderable, Q as Span, M as SpanContext, U as SpanEvent, O as SpanStatus, W as TracingContext, V as TracingContextKey, X as TracingContextManager, z as attachedContextSymbol, l as createAIElement, n as createContext, t as toDebugMessage } from './jsx-dev-runtime-uCZBuaDe.js';
3
3
  import { ZodObject, ZodRawShape, ZodTypeAny, ZodString, z } from 'zod';
4
4
  import { OpenAI } from 'openai';
5
5
  export { OpenAI as OpenAIClient } from 'openai';
6
6
  import { ChatCompletionSystemMessageParam, ChatCompletionUserMessageParam, ChatCompletionAssistantMessageParam, ChatCompletionCreateParams } from 'openai/resources';
7
7
  import AnthropicClient from '@anthropic-ai/sdk';
8
8
  export { default as AnthropicClient } from '@anthropic-ai/sdk';
9
- import { ImageBlockParam } from '@anthropic-ai/sdk/resources';
10
- export { countTokens as countAnthropicTokens } from '@anthropic-ai/tokenizer';
9
+
10
+ declare class ChatCompletionError extends Error {
11
+ readonly chatCompletionRequest: LogChatCompletionRequest;
12
+ readonly status: number | undefined;
13
+ readonly shouldRetry: boolean;
14
+ readonly name = "ChatCompletionError";
15
+ constructor(message: string, chatCompletionRequest: LogChatCompletionRequest, status: number | undefined, shouldRetry?: boolean);
16
+ }
17
+
18
+ declare const SystemMessage: (props: {
19
+ children: AINode;
20
+ }) => AINode;
21
+ declare const UserMessage: (props: {
22
+ children: AINode;
23
+ }) => AINode;
24
+ declare const AssistantMessage: (props: {
25
+ children: AINode;
26
+ }) => AINode;
27
+
28
+ type TokenizerFn = (message: ChatMessage) => number;
29
+ declare const computeUsage: (messages: ChatMessage[], tokenizer: TokenizerFn) => {
30
+ prompt: number;
31
+ completion: number;
32
+ total: number;
33
+ };
34
+
35
+ type ChatCompletionClientAndProvider<K> = {
36
+ client: K;
37
+ provider?: string;
38
+ providerRegion?: string;
39
+ costFn?: (model: string, usage: {
40
+ prompt: number;
41
+ completion: number;
42
+ }) => number;
43
+ };
11
44
 
12
45
  type CreateRenderContextOptions = {
13
46
  logger?: LogImplementation;
@@ -129,7 +162,7 @@ declare namespace AISpanAttributes {
129
162
  retryCount?: number;
130
163
  requestType: K;
131
164
  chatCompletionRequest: ChatCompletionRequestPayloads[K];
132
- inputMessages: RenderedConversationMessage[];
165
+ inputMessages: DebugMessage[];
133
166
  finishReason: string | null;
134
167
  output: string;
135
168
  tokensUsed: Usage;
@@ -138,7 +171,6 @@ declare namespace AISpanAttributes {
138
171
  declare namespace ProcessedAISpanAttributes {
139
172
  type Prompt = AISpanAttributes.Prompt & {
140
173
  prompt: never;
141
- evaluators: EvaluatorResult[];
142
174
  evaluatorResults: Record<string, EvaluatorResult>;
143
175
  evaluatorError?: string;
144
176
  totalUsage?: Usage;
@@ -201,7 +233,8 @@ declare module '@gammatech/aijsx' {
201
233
  openai: OpenAIChatCompletionRequest;
202
234
  }
203
235
  }
204
- type ValidOpenAIChatModel = 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo' | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-4-1106-preview' | 'gpt-4-0125-preview' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-16k-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-0125';
236
+ type ValidOpenAIVisionModel = 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo' | 'gpt-4-vision-preview';
237
+ type ValidOpenAIChatModel = ValidOpenAIVisionModel | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-4-1106-preview' | 'gpt-4-0125-preview' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-16k-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-0125';
205
238
  declare const OpenAIClientContext: Context<() => ChatCompletionClientAndProvider<OpenAI>>;
206
239
  type OpenAIChatCompletionProps = {
207
240
  model: ValidOpenAIChatModel;
@@ -214,33 +247,7 @@ type OpenAIChatCompletionProps = {
214
247
  };
215
248
  declare function OpenAIChatCompletion(props: OpenAIChatCompletionProps, ctx: RenderContext): AINode;
216
249
 
217
- type ValidOpenAIVisionModel = 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo' | 'gpt-4-vision-preview';
218
- declare const ContentTypeImage: (_props: {
219
- url: string;
220
- dimensions?: {
221
- width: number;
222
- height: number;
223
- };
224
- detail?: 'auto' | 'high' | 'low';
225
- }) => null;
226
- type OpenAIVisionChatCompletionProps = {
227
- model?: ValidOpenAIVisionModel;
228
- maxTokens?: number;
229
- stop?: string | string[];
230
- temperature?: number;
231
- maxRetries?: number;
232
- children: AINode;
233
- };
234
- declare function OpenAIVisionChatCompletion(props: OpenAIVisionChatCompletionProps, ctx: RenderContext): AINode;
235
- declare function OpenAIVisionChatCompletionInner(props: OpenAIVisionChatCompletionProps, { logger, render, tracer, getContext }: RenderContext): AsyncGenerator<string, void, unknown>;
236
-
237
- declare const tokenizer: {
238
- encode: (text: string) => number[];
239
- decode: (tokens: number[]) => string;
240
- };
241
- declare function tokenLimitForChatModel(model: ValidOpenAIChatModel): number | undefined;
242
- declare function tokenCountForOpenAIMessage(message: OpenAIChatMessage): number;
243
- declare function tokenCountForOpenAIVisionMessage(message: OpenAIChatMessage): number;
250
+ declare const openaiTokenizer: TokenizerFn;
244
251
 
245
252
  type AnthropicChatCompletionRequest = AnthropicClient.Messages.MessageStreamParams;
246
253
  declare module '@gammatech/aijsx' {
@@ -263,23 +270,7 @@ type AnthropicChatCompletionProps = {
263
270
  children: AINode;
264
271
  };
265
272
  declare function AnthropicChatCompletion(props: AnthropicChatCompletionProps, ctx: RenderContext): JSX.Element;
266
- /**
267
- * An AI.JSX component that invokes an Anthropic Large Language Model.
268
- * @param children The children to render.
269
- * @param chatModel The chat model to use.
270
- * @param completionModel The completion model to use.
271
- * @param client The Anthropic client.
272
- */
273
- declare function AnthropicChatCompletionInner(props: AnthropicChatCompletionProps, { render, logger, tracer, getContext }: RenderContext): AsyncGenerator<string, void, unknown>;
274
273
 
275
- type ClaudeImageBlockBase64 = {
276
- data: string;
277
- mediaType: ImageBlockParam.Source['media_type'];
278
- };
279
- type ClaudeImageBlockUrl = {
280
- url: string;
281
- };
282
- type ClaudeImageBlockProps = ClaudeImageBlockBase64 | ClaudeImageBlockUrl;
283
- declare const ClaudeImageBlock: (props: ClaudeImageBlockProps) => Promise<JSX.Element>;
274
+ declare const anthropicTokenizer: TokenizerFn;
284
275
 
285
- export { AIComponent, AINode, AISpanAttributes, AISpanProcessor, AnthropicChatCompletion, AnthropicChatCompletionInner, type AnthropicChatCompletionRequest, AnthropicClientContext, ChatCompletionClientAndProvider, type ChatCompletionRequestPayloads, ClaudeImageBlock, ContentTypeImage, Context, type CostFn, DefaultMaxRetriesContext, EnrichingSpanProcessor, EvaluatorFn, EvaluatorResult, Fallback, FunctionChain, LogImplementation, NotAsyncGenerator, OpenAIChatCompletion, type OpenAIChatCompletionRequest, type OpenAIChatMessage, OpenAIClientContext, OpenAIVisionChatCompletion, OpenAIVisionChatCompletionInner, ParseVariablesError, ProcessedAISpanAttributes, type Prompt, PromptInvalidOutputError, PromptParsed, ReadableSpan, RenderContext, RenderedConversationMessage, Retry, RetryCountContext, SpanAttributes, SpanExporter, SpanProcessor, StreamChain, Trace, Tracer, type ValidAnthropicChatModel, type ValidOpenAIChatModel, type ValidOpenAIVisionModel, createFunctionChain, createPrompt, createRenderContext, createStreamChain, evaluatePrompt, tokenCountForOpenAIMessage, tokenCountForOpenAIVisionMessage, tokenLimitForChatModel, tokenizer, tracing };
276
+ export { AIComponent, AINode, AISpanAttributes, AISpanProcessor, AnthropicChatCompletion, type AnthropicChatCompletionRequest, AnthropicClientContext, AssistantMessage, type ChatCompletionClientAndProvider, ChatCompletionError, type ChatCompletionRequestPayloads, ChatMessage, Context, type CostFn, DebugMessage, DefaultMaxRetriesContext, EnrichingSpanProcessor, EvaluatorFn, EvaluatorResult, Fallback, FunctionChain, LogChatCompletionRequest, LogImplementation, NotAsyncGenerator, OpenAIChatCompletion, type OpenAIChatCompletionRequest, type OpenAIChatMessage, OpenAIClientContext, ParseVariablesError, ProcessedAISpanAttributes, type Prompt, PromptInvalidOutputError, PromptParsed, ReadableSpan, RenderContext, Retry, RetryCountContext, SpanAttributes, SpanExporter, SpanProcessor, StreamChain, SystemMessage, type TokenizerFn, Trace, Tracer, UserMessage, type ValidAnthropicChatModel, type ValidOpenAIChatModel, type ValidOpenAIVisionModel, anthropicTokenizer, computeUsage, createFunctionChain, createPrompt, createRenderContext, createStreamChain, evaluatePrompt, openaiTokenizer, tracing };