SIGN IN SIGN UP

feat(prompts): Implement Prompts support in phoenix-client typescript (#6189)

* refactor(prompts): Reorganize phoenix js client exports

* feat(js): ts prompt  sdk

* cleanup

* wip

* Lint

* Initial getPrompt implementation

* Scaffold provider transformers

* Replace prompt variables

* Add prompt formatting test

* Log tool calls in example

* Tweak prompt examples

* Implement anthropic parsing / conversion

* Add stripped down prompt application example

* Remove debug code

* Publish preview releases of phoenix-client

* Update pkg pr new workflow

* Change working dir

* Update lockfile path

* Recursively build

* Bump generated types

* Update experimental package publish workflow

* Update tests and schemas

* Add anthropic tests

* Documentation

* Regenerate schemas

* Fix config test

* Make examples more consistent

* Support normalized tool schema from phoenix

* Support optional Variables generic to enforce variable types into toX helpers

* Rename OutputSchema to ResponseFormat

* Remove dependency on remeda, fix tests

* Update deps and optional deps

* Rename promptMessageFormatter to formatPromptMessages

* Comments

* Remove experimental package export

* Try not to throw in user code

TODO: Allow users to configure error behavior
- throw
- return null

* Apply corepack fix to pkg.pr.new action

* Move corepack upgrade upwards

* Nix top level index re-export

Better for tree-shaking

* Remove pnpm cache

something about the corepack install is making the cache location incorrect

* Fix broken lockfile post-rebase

* Use normalized tool_choice value in prompt -> sdk conversion

---------

Co-authored-by: Mikyo King <mikyo@arize.com>
A
Anthony Powell committed
d723cd85bb84819cf7c2a10192a02389bb9d3d23
Parent: 20c8bef
Committed by Mikyo King <mikyo@arize.com> on 2/19/2025, 10:52:47 PM