feat(prompts): add prompts module — CRUDL REST API + GraphQL content retrieval#3
Closed
ai-pilo wants to merge 50 commits intoArize-ai:mainfrom
Closed
feat(prompts): add prompts module — CRUDL REST API + GraphQL content retrieval#3ai-pilo wants to merge 50 commits intoArize-ai:mainfrom
ai-pilo wants to merge 50 commits intoArize-ai:mainfrom
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ions - Add missing @param docs for 5 optional params in createPrompt - Add "An optional" prefix to optional params in updatePrompt - Remove @remarks tags from all 4 files (no reference module uses them) - Use explicit field enumeration in transformPrompt (match majority convention) - Use fixture field references in test assertions instead of hardcoded strings - Remove unused mockDateString variable from fixtures Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…reRelease to all prompts functions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…es in README - promptId → promptNodeId (GraphQL Relay Global ID, not REST ID) - content.promptVersions → content.versions (correct property name) - spaceId → spaceNodeId in listPromptsWithContent example - Add by-name lookup example and Relay ID clarification note Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…throwing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…kup in pushPrompt Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…unctions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ures.ts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…elegating to findPromptByName Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…l.ts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ionId support Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
|
Hey @ai-pilo , thanks for the PR. We actually support it now. Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a full
promptsmodule to@arizeai/ax-client, following the same conventions established bydatasets,experiments, andannotation_configs.What's added
REST CRUD (v2 Prompts API):
listPrompts— paginated list of prompts, filterable by spacecreatePrompt— create a prompt with initial version (messages, provider, LLM params)getPrompt— fetch prompt metadata by IDupdatePrompt— patch description and tagsdeletePrompt— remove a prompt by IDGraphQL content retrieval (alpha):
getPromptContent— full prompt content including messages, LLM parameters, and version history via GraphQLlistPromptsWithContent— paginated list with full content via GraphQLInternal:
src/graphql/— minimal GraphQL transport layer (graphqlFetch) for authenticated POST requestsWhy two transports?
The REST v2
GET /v2/prompts/{id}endpoint returns metadata only (name, tags, timestamps). Full content — messages, LLM parameters, version history — is currently only available via GraphQL. The GraphQL functions are marked alpha and will be consolidated once the REST API is extended.Design decisions
Record<string, unknown>for message/param fields inPromptWithContentLLMMessage/InvocationParamswhere we control the shapewarnPreRelease()on all prompts functionsdatasets,experiments) which unit-test transforms onlyModule structure
Follows the established pattern:
Tests
client.tstests: 48% → 96% coveragedatasets/utils.tsandexperiments/utils.tsChecklist
src/types/index.tspnpm testpasses (60/60)pnpm run type:checkpasses🤖 Generated with Claude Code