Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ const pinned = await getPrompt("support/reply", { version: 13 });
its prompt.
- getPrompt uses the API key and base URL of an enabled `init()`, or `TELEMETRY_DEV_API_KEY` and
`TELEMETRY_DEV_BASE_URL`, or its own `apiKey`, `baseUrl`, and `fetch` options. It reads the same
host that telemetry goes to, `https://api.telemetry.dev` by default. The key needs the read
scope for prompts.
host that telemetry goes to, `https://api.telemetry.dev` by default. The key must have Read
prompts in its Access on the API keys page (the `prompts:read` scope).
- When a label sends part of the traffic to a second version, each session keeps one version: the
choice uses the session id of `propagateAttributes` (or of `sessionMode: "process"`). Without a
session id, each call chooses at random.
Expand Down
5 changes: 4 additions & 1 deletion packages/sdk/src/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ interface GetPromptOptionsBase {
version?: number;
/** Seconds before a call fetches a kept prompt again, in the background. Default 60. */
cacheTtlSeconds?: number;
/** API key with the prompts:read scope. Falls back to the initialized client, then `TELEMETRY_DEV_API_KEY`. */
/**
* API key with Read prompts in its Access (the prompts:read scope). Falls back to the initialized
* client, then `TELEMETRY_DEV_API_KEY`.
*/
apiKey?: string;
/** Falls back to the initialized client, then `TELEMETRY_DEV_BASE_URL`, then `https://api.telemetry.dev`. */
baseUrl?: string;
Expand Down
4 changes: 2 additions & 2 deletions sdks/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ pinned = telemetry_dev.get_prompt("support/reply", version=13)
without its prompt.
- `get_prompt` uses the API key and base URL of an enabled `init()`, or `TELEMETRY_DEV_API_KEY`
and `TELEMETRY_DEV_BASE_URL`, or its own `api_key` and `base_url`. It reads the same host that
telemetry goes to, `https://api.telemetry.dev` by default. The key needs the read scope for
prompts.
telemetry goes to, `https://api.telemetry.dev` by default. The key must have Read prompts in
its Access on the API keys page (the `prompts:read` scope).
- When a label sends part of the traffic to a second version, each session keeps one version: the
choice uses the session id of `propagate_attributes` (or of `session_mode="process"`). Without a
session id, each call chooses at random.
Expand Down
Loading