@posthog/ai 8.18.6 → 8.19.0

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.
@@ -24,6 +24,18 @@ interface CostOverride {
24
24
  outputCost: number;
25
25
  }
26
26
  //#endregion
27
+ //#region src/openai/utils.d.ts
28
+ /**
29
+ * The response of `embeddings.create` with `encoding_format: 'base64'`, where each embedding is a base64 string.
30
+ * openai 7.5+ types that call with this shape. It is declared here because openai 6 has no such type and
31
+ * openai 7 doesn't export it.
32
+ */
33
+ type Base64EmbeddingResponse = Omit<OpenAIOrignal.CreateEmbeddingResponse, 'data'> & {
34
+ data: Array<Omit<OpenAIOrignal.Embedding, 'embedding'> & {
35
+ embedding: string;
36
+ }>;
37
+ };
38
+ //#endregion
27
39
  //#region src/openai/azure.d.ts
28
40
  type ChatCompletion$1 = OpenAIOrignal.ChatCompletion;
29
41
  type ChatCompletionChunk$1 = OpenAIOrignal.ChatCompletionChunk;
@@ -78,6 +90,9 @@ declare class WrappedEmbeddings$1 extends AzureOpenAI.Embeddings {
78
90
  private readonly phClient;
79
91
  private readonly baseURL;
80
92
  constructor(client: AzureOpenAI, phClient: PostHog);
93
+ create(body: EmbeddingCreateParams$1 & {
94
+ encoding_format: 'base64';
95
+ } & MonitoringParams, options?: RequestOptions$1): APIPromise<Base64EmbeddingResponse>;
81
96
  create(body: EmbeddingCreateParams$1 & MonitoringParams, options?: RequestOptions$1): APIPromise<CreateEmbeddingResponse$1>;
82
97
  }
83
98
  //#endregion
@@ -143,6 +158,9 @@ declare class WrappedEmbeddings extends Embeddings {
143
158
  private readonly phClient;
144
159
  private readonly baseURL;
145
160
  constructor(client: OpenAI, phClient: PostHog);
161
+ create(body: EmbeddingCreateParams & {
162
+ encoding_format: 'base64';
163
+ } & MonitoringParams, options?: RequestOptions): APIPromise<Base64EmbeddingResponse>;
146
164
  create(body: EmbeddingCreateParams & MonitoringParams, options?: RequestOptions): APIPromise<CreateEmbeddingResponse>;
147
165
  }
148
166
  declare class WrappedAudio extends Audio {
@@ -552,7 +552,7 @@ function formatOpenAIResponsesInput(input, instructions) {
552
552
  }
553
553
  //#endregion
554
554
  //#region package.json
555
- var version = "8.18.6";
555
+ var version = "8.19.0";
556
556
  //#endregion
557
557
  //#region src/serializeError.ts
558
558
  const DEFAULT_MAX_DEPTH = 3;