Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: prompt playground beta #4775

Merged
merged 42 commits into from
Oct 16, 2024
Merged

feat: prompt playground beta #4775

merged 42 commits into from
Oct 16, 2024

Conversation

mikeldking
Copy link
Contributor

@mikeldking mikeldking commented Sep 26, 2024

The feature branch for the playground feature #3435

@mikeldking mikeldking added feature branch a feature branch that consolidates multiple features into a single commit on main DO NOT MERGE labels Sep 26, 2024
Copy link
Contributor

@axiomofjoy axiomofjoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In progress

mikeldking and others added 22 commits October 11, 2024 14:10
* docs: initial playground PRD

* feat: playground prototype

* add rudamentary messages UI

* WIP

* routing

* add a playground button

* cleanup

* cleanup routes

* Update app/src/pages/playground/PlaygroundTemplate.tsx

* Update app/src/pages/playground/spanPlaygroundPageLoader.ts

* cleanup store
* add subscriptions

* configure relay

* playground mvp

* align the runs for multiple

* add more functionality

* cleanup the components

---------

Co-authored-by: Mikyo King <[email protected]>
* feat(playground): Chat message with role

* feat(playground): pass in messages and roles

* Update app/src/pages/playground/MessageRolePicker.tsx
* feat(playground): Implement message role picker callback

* style(playground): Shorten import path for playgroundUtils
…round span replay (#4906)

* begin building zod schemas for llm attributes

* feat(playground): parse span input messages

* move to utils, update role

* update initial instance id

* update id generation, add todo, add test files

* add tests

* memoize

* move jest-canvas-mock to dev dependencies

* update span not found error message

* parse roles as strings and corece to ChatMessageRole

* update ChatRoleMap comment

* fix typos

* update prop type to be InitialPlaygroundState

* update naming

* fix naming conflict
…#4923)

* refactor(playground): move run, test input mode selection the top bar

* remove unused
* feat(playground): make chat messages match style in traces

* small fixes

* WIP
…#4951)

* WIP

* feat(playground): allow up to 4 playground instances, distinguish alphabetically
… and drop (#4945)

* fix(playground): ignore keyboard events in template messages for drag and drop

* pull default pointer sensor from dnd-kit/dom

* update file name casing via git

* migrate to non-experimental dnd-kit

* remove unused experimental code, update naming and remove unnecessary props

* remove strategy

* fix forward ref warning
#4954)

* feat(playground): provide a back to trace button from the span playground

* fix

* fix types in tests
* change to vi

* ci: fix vitest

* remove unnecessary issues
)

* feat(playground): accumulate errors while parsing span attributes

* update tests to include message id's / tools

* update output for runs

* update comments / test names

* move parsing errors into span playground banners

* cleanup spanplaygroundpage

* add function to verify zod schema matches type
* Add query for model providers

* gql build

* Hardcode all models for now
* global declaration of generative

* feat(playground): rudamentary model selector

* model provider in tests

* WIP
cephalization and others added 19 commits October 14, 2024 12:34
…4943)

* feat(playground): Implement codemirror based template string editor

* Implement mustacheLike Language grammar

* Fix top level language definitions

* feat(playground): Support template escaping and nesting in fstring template lang

* feat(playground): Improve mustache grammar and implement mustache format fn

* fix(playground): Allow Enter key within codemirror editor

* refactor(playground): Improve comments for mustache like lang

* refactor(playground): Refactor variable extraction and lang format funcs into shared utils

* test(playground): Test FStringTemplate and MustacheTemplate languages

* refactor(playground): Remove debug logging

* fix(playground): Correctly parse empty templates, escape slashes, triple braces

* fix(playground): Apply parsing fixes to fstring as well

* refactor(playground): Remove debug

* docs(playground): Add comments to lexer grammars

* docs(playground): Add comments to debug fns

* docs(playground): Improve comment formatting

* refactor(playground): Use named object arguments for variable extractor

* refactor(playground): rename lang directories

* fix(playground): Add a lightmode theme to template editor

* refactor(playground): More detailed typing to variable format record
* feat(playground): add credential storage

* organize

* reorganize store files

* add credentials dropdown

* remove unused icon

* make credentials inputs unique per provider

* update unique logic for providers

* migrate to instance.model.provider from instance.provider

* move provider in tests
* playground layout

* WIP

* final changes

* fix styles

* final fix

* cleanup the store

* Update app/src/components/resize/styles.tsx
…lates as "inputs" (#4994)

* feat(playground): Extract and display variables from all message templates as "inputs"

* docs(playground): Add comments

* fix(playground): Switch default language back to Mustache

* docs(playground): Add comments and improve typing readability for template utils

* feat(playground): Support text completion prompt variable substitution
* feat(playground): add tools ui

* add tools back after rebase

* update tool type to be partial in store for editing

* make tool editor uncontrolled, add tool choice selector

* make fields pass through

* allow for extra keys in the json schema

* support json schema in jsonEditor, remove jsonToolEditor

* update descriptions

* fix types

* fix key collision on choice picker

* update comment

* more comments

* WIP

* styling

* cleanup

---------

Co-authored-by: Mikyo King <[email protected]>
…#5006)

* feat(playground): Implement editable input variable textareas (#4987)

* docs(playground): Improve commenting around playground store usage

* refactor(playground): Switch to mostly unstyled codemirror for variable editing

* fix(playground): Fix styling issues and flickering when rendering playground variable inputs

* refactor(playground): Add and use type guards for playground input type

* docs(playground): update comment on variable cache mechanics

* fix(playground): fix types and tests post rebase
* feat(playground): parse model name and infer provider form span

* update azure model selector to be a text field to account for user defined deployment names

* add label

* move defaults into generative constants, fallback to openai not azure

* update defult in test
@axiomofjoy axiomofjoy marked this pull request as ready for review October 16, 2024 19:09
@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Oct 16, 2024
@axiomofjoy axiomofjoy changed the title feat!: prompt playground feat: prompt playground Oct 16, 2024
@mikeldking mikeldking changed the title feat: prompt playground feat: prompt playground beta Oct 16, 2024
@mikeldking mikeldking merged commit 4b02294 into main Oct 16, 2024
54 of 60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature branch a feature branch that consolidates multiple features into a single commit on main size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants