@posthog/ai 7.8.4 → 7.8.5

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.ts CHANGED
@@ -308,7 +308,7 @@ type PromptsOptions = PromptsWithPostHogOptions | PromptsDirectOptions;
308
308
  * // Or with direct options (no PostHog client needed)
309
309
  * const prompts = new Prompts({
310
310
  * personalApiKey: 'phx_xxx',
311
- * host: 'https://us.i.posthog.com',
311
+ * host: 'https://us.posthog.com',
312
312
  * })
313
313
  *
314
314
  * // Fetch with caching and fallback
package/dist/index.mjs CHANGED
@@ -6,7 +6,7 @@ import { uuidv7 } from '@posthog/core';
6
6
  import AnthropicOriginal from '@anthropic-ai/sdk';
7
7
  import { GoogleGenAI } from '@google/genai';
8
8
 
9
- var version = "7.8.4";
9
+ var version = "7.8.5";
10
10
 
11
11
  // Type guards for safer type checking
12
12
  const isString = value => {
@@ -4366,7 +4366,7 @@ function isPromptsWithPostHog(options) {
4366
4366
  * // Or with direct options (no PostHog client needed)
4367
4367
  * const prompts = new Prompts({
4368
4368
  * personalApiKey: 'phx_xxx',
4369
- * host: 'https://us.i.posthog.com',
4369
+ * host: 'https://us.posthog.com',
4370
4370
  * })
4371
4371
  *
4372
4372
  * // Fetch with caching and fallback
@@ -4392,7 +4392,7 @@ class Prompts {
4392
4392
  } else {
4393
4393
  // Direct options
4394
4394
  this.personalApiKey = options.personalApiKey;
4395
- this.host = options.host ?? 'https://us.i.posthog.com';
4395
+ this.host = options.host ?? 'https://us.posthog.com';
4396
4396
  }
4397
4397
  }
4398
4398
  /**
@@ -4475,7 +4475,7 @@ class Prompts {
4475
4475
  if (!this.personalApiKey) {
4476
4476
  throw new Error('[PostHog Prompts] personalApiKey is required to fetch prompts. ' + 'Please provide it when initializing the Prompts instance.');
4477
4477
  }
4478
- const url = `${this.host}/api/projects/@current/llm_prompts/name/${encodeURIComponent(name)}/`;
4478
+ const url = `${this.host}/api/environments/@current/llm_prompts/name/${encodeURIComponent(name)}/`;
4479
4479
  const response = await fetch(url, {
4480
4480
  method: 'GET',
4481
4481
  headers: {