@posthog/ai 6.1.1 → 6.1.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/anthropic/index.cjs +80 -4
- package/dist/anthropic/index.cjs.map +1 -1
- package/dist/anthropic/index.mjs +80 -4
- package/dist/anthropic/index.mjs.map +1 -1
- package/dist/gemini/index.cjs +80 -29
- package/dist/gemini/index.cjs.map +1 -1
- package/dist/gemini/index.d.ts +3 -21
- package/dist/gemini/index.mjs +80 -29
- package/dist/gemini/index.mjs.map +1 -1
- package/dist/index.cjs +359 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -21
- package/dist/index.mjs +359 -55
- package/dist/index.mjs.map +1 -1
- package/dist/langchain/index.cjs.map +1 -1
- package/dist/langchain/index.mjs.map +1 -1
- package/dist/openai/index.cjs +89 -11
- package/dist/openai/index.cjs.map +1 -1
- package/dist/openai/index.mjs +89 -11
- package/dist/openai/index.mjs.map +1 -1
- package/dist/vercel/index.cjs +49 -3
- package/dist/vercel/index.cjs.map +1 -1
- package/dist/vercel/index.mjs +49 -3
- package/dist/vercel/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { LanguageModelV2 } from '@ai-sdk/provider';
|
|
|
6
6
|
import AnthropicOriginal from '@anthropic-ai/sdk';
|
|
7
7
|
import { RequestOptions as RequestOptions$2, APIPromise as APIPromise$1 } from '@anthropic-ai/sdk/core';
|
|
8
8
|
import { Stream as Stream$1 } from '@anthropic-ai/sdk/streaming';
|
|
9
|
-
import { GoogleGenAI } from '@google/genai';
|
|
9
|
+
import { GoogleGenAI, GenerateContentParameters, GenerateContentResponse } from '@google/genai';
|
|
10
10
|
import { BaseCallbackHandler } from '@langchain/core/callbacks/base';
|
|
11
11
|
import { Serialized } from '@langchain/core/load/serializable';
|
|
12
12
|
import { ChainValues } from '@langchain/core/utils/types';
|
|
@@ -139,24 +139,6 @@ declare class WrappedMessages extends AnthropicOriginal.Messages {
|
|
|
139
139
|
create(body: MessageCreateParamsBase & MonitoringParams, options?: RequestOptions$2): APIPromise$1<Stream$1<RawMessageStreamEvent> | Message>;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
type GenerateContentRequest = {
|
|
143
|
-
model: string;
|
|
144
|
-
contents: any;
|
|
145
|
-
config?: any;
|
|
146
|
-
[key: string]: any;
|
|
147
|
-
};
|
|
148
|
-
type GenerateContentResponse = {
|
|
149
|
-
text?: string;
|
|
150
|
-
candidates?: any[];
|
|
151
|
-
usageMetadata?: {
|
|
152
|
-
promptTokenCount?: number;
|
|
153
|
-
candidatesTokenCount?: number;
|
|
154
|
-
totalTokenCount?: number;
|
|
155
|
-
thoughtsTokenCount?: number;
|
|
156
|
-
cachedContentTokenCount?: number;
|
|
157
|
-
};
|
|
158
|
-
[key: string]: any;
|
|
159
|
-
};
|
|
160
142
|
interface MonitoringGeminiConfig {
|
|
161
143
|
apiKey?: string;
|
|
162
144
|
vertexai?: boolean;
|
|
@@ -175,8 +157,8 @@ declare class WrappedModels {
|
|
|
175
157
|
private readonly phClient;
|
|
176
158
|
private readonly client;
|
|
177
159
|
constructor(client: GoogleGenAI, phClient: PostHog);
|
|
178
|
-
generateContent(params:
|
|
179
|
-
generateContentStream(params:
|
|
160
|
+
generateContent(params: GenerateContentParameters & MonitoringParams): Promise<GenerateContentResponse>;
|
|
161
|
+
generateContentStream(params: GenerateContentParameters & MonitoringParams): AsyncGenerator<GenerateContentResponse, void, unknown>;
|
|
180
162
|
private formatInput;
|
|
181
163
|
private formatInputForPostHog;
|
|
182
164
|
}
|