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

Release 1.5.3 #147

Merged
merged 231 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
231 commits
Select commit Hold shift + click to select a range
5a3581c
Merge branch 'development' into release
karthikscale3 Apr 1, 2024
63fa12e
Merge branch 'development' of github.com:Scale3-Labs/langtrace into r…
karthikscale3 Apr 2, 2024
540b613
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Apr 2, 2024
b2cd5c2
Merge branch 'development' into release
karthikscale3 Apr 2, 2024
e428dc9
Merge branch 'development' into release
karthikscale3 Apr 2, 2024
1490b00
Merge branch 'development' into release
karthikscale3 Apr 2, 2024
62e7250
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Apr 2, 2024
7cbc191
Merge branch 'development' into release
karthikscale3 Apr 2, 2024
6c097a5
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Apr 2, 2024
7041a32
Merge branch 'development' into release
karthikscale3 Apr 2, 2024
7dd49d0
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Apr 2, 2024
c30d1bf
Merge branch 'development' into release
karthikscale3 Apr 2, 2024
81c9f8c
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Apr 3, 2024
aaec9b0
Merge branch 'development' into release
karthikscale3 Apr 3, 2024
02358de
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Apr 3, 2024
3f21ae0
Merge branch 'development' into release
karthikscale3 Apr 3, 2024
b178105
Pagination bug
karthikscale3 Apr 4, 2024
af47e53
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 4, 2024
65eb483
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Apr 4, 2024
29c53c7
Merge branch 'development' into release
karthikscale3 Apr 4, 2024
cc6ab77
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 4, 2024
677b1aa
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 4, 2024
642483d
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Apr 4, 2024
db451ad
Merge branch 'development' into release
karthikscale3 Apr 4, 2024
f996899
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 4, 2024
fa9bac5
Merge branch 'development' into release
karthikscale3 Apr 4, 2024
0e963e2
Bug fix
karthikscale3 Apr 5, 2024
f3a8a23
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 5, 2024
da27c8a
Merge branch 'development' into release
karthikscale3 Apr 5, 2024
e3273b7
fix merge conflicts
karthikscale3 Apr 5, 2024
3c353a5
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 5, 2024
0b0545a
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Apr 5, 2024
7154a9b
Merge branch 'development' into release
karthikscale3 Apr 5, 2024
94f0fb1
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 7, 2024
f22f397
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 8, 2024
5023d1f
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 9, 2024
2ebb4fa
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Apr 9, 2024
e3cb63b
Merge branch 'development' into release
karthikscale3 Apr 9, 2024
4178d5c
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 11, 2024
4fe4108
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 13, 2024
784f09c
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 14, 2024
391320d
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Apr 14, 2024
ca49b2b
Merge branch 'development' into release
karthikscale3 Apr 14, 2024
42f1128
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 19, 2024
71ad0d5
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Apr 19, 2024
0be2143
Merge branch 'development' into release
karthikscale3 Apr 19, 2024
51e3310
chore: add docker cmd
darshit-s3 Apr 23, 2024
0b424f2
Compatibility fixes for SDK version 2.0.0 (#69)
karthikscale3 Apr 24, 2024
0c8e92b
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 24, 2024
a6f7c97
Merge
karthikscale3 Apr 24, 2024
e0e0c2b
Merge branch 'development' into release
karthikscale3 Apr 24, 2024
3ed6d31
Merge pull request #66 from Scale3-Labs/add-docker-cmd
darshit-s3 Apr 25, 2024
28227d9
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 28, 2024
9a0b049
Support for Langgraph, Qdrant & Groq (#73)
karthikscale3 Apr 28, 2024
0cec8be
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Apr 28, 2024
f6f47e8
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Apr 28, 2024
cf4867c
Merge branch 'development' into release
karthikscale3 Apr 28, 2024
64bda4a
feat: optimise docker image for self host setup
darshit-s3 Apr 29, 2024
36620bb
Merge branch 'development' into optimise-docker-image
darshit-s3 Apr 30, 2024
95de2de
Merge pull request #75 from Scale3-Labs/optimise-docker-image
darshit-s3 Apr 30, 2024
a1025f7
adding api access to traces endpoint
dylanzuber-scale3 May 1, 2024
bc90bbd
clean up
dylanzuber-scale3 May 2, 2024
1426245
refactor
dylanzuber-scale3 May 2, 2024
934e304
Merge pull request #78 from Scale3-Labs/dylan/s3en-2221-add-api-key-a…
dylanzuber-scale3 May 2, 2024
ea5cd7b
feat: add clickhouse db create on app start (#79)
darshit-s3 May 4, 2024
34875e2
docs: add railway deploy, fix sdk badges (#81)
darshit-s3 May 7, 2024
4551d7e
untrack .env
rohit-kadhe May 7, 2024
c7b05ca
Revert "untrack .env"
rohit-kadhe May 7, 2024
096ee2e
Playground and Prompt Management (#83)
karthikscale3 May 7, 2024
9766d40
fix: clickhouse table find queries (#82)
darshit-s3 May 7, 2024
eae354d
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 7, 2024
f67f7fb
Merge branch 'development' of github.com:Scale3-Labs/langtrace into r…
rohit-kadhe May 7, 2024
1c480c9
Fix to surface multiple LLM requests inside LLM View (#84)
karthikscale3 May 7, 2024
7723147
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 7, 2024
b588d25
Fix merge conflicts
karthikscale3 May 7, 2024
2a28815
Fix merge conflict
karthikscale3 May 7, 2024
db5959c
Minor bugfixes (#86)
karthikscale3 May 7, 2024
39acc90
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 May 7, 2024
31bfd5f
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 7, 2024
9b677c1
Merge branch 'development' into release
karthikscale3 May 7, 2024
7f32b5a
Merge branch 'development' of github.com:Scale3-Labs/langtrace into r…
rohit-kadhe May 7, 2024
fd347a2
api to fetch promptset with prompt filters
rohit-kadhe May 8, 2024
66c1293
bug fixes
rohit-kadhe May 8, 2024
e039e5c
fix invalid redirect
rohit-kadhe May 8, 2024
c3f6ade
fix invalid status code
rohit-kadhe May 8, 2024
974756f
Merge pull request #88 from Scale3-Labs/rohit/S3EN-2232-get-prompts-api
rohit-kadhe May 9, 2024
1b9c986
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 9, 2024
1296c89
Project Switcher (#90)
karthikscale3 May 9, 2024
31f50e6
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 9, 2024
82bd818
Feat: dataset download (#60)
MayuriS24 May 9, 2024
4e30354
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 9, 2024
e3edb54
Update prompt registry with instructions to fetch prompts (#91)
karthikscale3 May 9, 2024
9cbb929
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 9, 2024
94b13f6
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 May 9, 2024
417c314
update package lock
karthikscale3 May 9, 2024
e7c63ff
Minor bugfix (#94)
karthikscale3 May 9, 2024
bee3df8
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 9, 2024
9b82b03
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 May 9, 2024
28ff70b
Merge branch 'development' into release
karthikscale3 May 9, 2024
7d338dc
chore: update github repo badges
darshit-s3 May 10, 2024
0ce5a24
Merge pull request #96 from Scale3-Labs/update-github-badges
darshit-s3 May 10, 2024
a0c9b72
optimizing token count function
dylanzuber-scale3 May 13, 2024
186f82b
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 13, 2024
519cb22
Add GPT4-O Pricing and Playground (#98)
karthikscale3 May 13, 2024
2099f1d
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 13, 2024
dc45189
Dylan/s3en 2234 add perplexity support to playground (#89)
dylanzuber-scale3 May 13, 2024
047f9b6
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 13, 2024
153ac91
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 May 13, 2024
13f04aa
Merge branch 'development' into release
karthikscale3 May 13, 2024
292a57b
api changes
rohit-kadhe May 13, 2024
a2ad213
add api access to get api and fix all bugs
rohit-kadhe May 14, 2024
5573d3e
bug fix
rohit-kadhe May 14, 2024
5e90a1a
bug fix
rohit-kadhe May 14, 2024
97cf9b5
Merge pull request #101 from Scale3-Labs/rohit/S3EN-2256-user-feedbac…
rohit-kadhe May 14, 2024
5ba0dbf
updating descriptions to optional
dylanzuber-scale3 May 14, 2024
9e980ad
prio python
dylanzuber-scale3 May 14, 2024
4382d65
Merge pull request #103 from Scale3-Labs/dylan/s3en-2279-ux-improvements
dylanzuber-scale3 May 15, 2024
56427c3
cleanup and fixes
rohit-kadhe May 15, 2024
a80fd4d
Merge branch 'development' of github.com:Scale3-Labs/langtrace into r…
rohit-kadhe May 15, 2024
2838cc7
more bug fixes
rohit-kadhe May 15, 2024
ccd42b6
more fixes
rohit-kadhe May 15, 2024
acc5ea5
remove console log
rohit-kadhe May 15, 2024
72fa55b
Merge pull request #104 from Scale3-Labs/rohit/S3EN-2282-remove-redun…
rohit-kadhe May 15, 2024
3e09cc0
Merge pull request #97 from Scale3-Labs/dylan/s3en-2261-optimize-get-…
dylanzuber-scale3 May 15, 2024
cd5e347
updating trace_service functions
dylanzuber-scale3 May 16, 2024
52589fd
add migration
rohit-kadhe May 16, 2024
108baf7
add format function, updating from day to hour
dylanzuber-scale3 May 16, 2024
887021a
Merge pull request #105 from Scale3-Labs/rohit/S3EN-2285-add-missing-…
rohit-kadhe May 16, 2024
a043bd6
adding dropwdown menu
dylanzuber-scale3 May 16, 2024
2944e15
updating query key
dylanzuber-scale3 May 16, 2024
98fb7d7
updating query keys v2
dylanzuber-scale3 May 16, 2024
812e239
clean up
dylanzuber-scale3 May 16, 2024
6baf9a2
Merge remote-tracking branch 'origin/development' into dylan/s3en-226…
dylanzuber-scale3 May 16, 2024
d872bc0
fix bug
rohit-kadhe May 16, 2024
729c164
Merge pull request #107 from Scale3-Labs/rohit/S3EN-2287-bug-fix-eval…
dylanzuber-scale3 May 16, 2024
2fba611
Merge remote-tracking branch 'origin/development' into dylan/s3en-226…
dylanzuber-scale3 May 16, 2024
ed1c2f4
Merge pull request #106 from Scale3-Labs/dylan/s3en-2264-add-date-fil…
dylanzuber-scale3 May 16, 2024
4d8d0a1
Minor bugfix (#102)
karthikscale3 May 17, 2024
194c65e
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 17, 2024
775fd55
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 May 17, 2024
7725ac1
Merge branch 'development' into release
karthikscale3 May 17, 2024
bbc221c
fixes
dylanzuber-scale3 May 17, 2024
eab02bb
Merge pull request #109 from Scale3-Labs/dylan/s3en-2293-chart-bug-fix
dylanzuber-scale3 May 19, 2024
63eb067
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 20, 2024
f2d9ea5
Bug fixes to Evaluations (#111)
karthikscale3 May 21, 2024
3a44486
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 21, 2024
ba91426
upgrading tiktoken, adding omni to pricing (#110)
dylanzuber-scale3 May 21, 2024
9ad8c44
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 21, 2024
10840e8
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 May 21, 2024
4a7c307
Merge branch 'development' into release
karthikscale3 May 21, 2024
740a3d6
Update package
karthikscale3 May 21, 2024
ea4cc92
Dataset bugfix (#113)
karthikscale3 May 21, 2024
5605411
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 21, 2024
38f0c1a
Minor linking fix (#114)
karthikscale3 May 21, 2024
eb53696
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 21, 2024
8904b5d
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 May 21, 2024
7ee9a3a
Merge branch 'development' into release
karthikscale3 May 21, 2024
29bc615
api bug fix (#116)
rohit-kadhe May 22, 2024
b9f140e
fixing dropdown color (#117)
dylanzuber-scale3 May 22, 2024
1d29604
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 22, 2024
d91f619
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 May 22, 2024
79e62b9
Merge branch 'development' into release
karthikscale3 May 22, 2024
c0ede4b
Support for Image inputs (#119)
karthikscale3 May 22, 2024
c530938
Bug fix Spans with status_code = "ERROR" (#120)
karthikscale3 May 22, 2024
020a3a9
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 22, 2024
20d4132
Dylan/s3en 2265 save prompt and model settings directly from playgrou…
dylanzuber-scale3 May 22, 2024
b9b73db
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 22, 2024
337ac05
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 May 22, 2024
4187923
Merge branch 'development' into release
karthikscale3 May 22, 2024
e584076
adding image display
dylanzuber-scale3 May 23, 2024
80fc11c
Merge remote-tracking branch 'origin/development' into dylan/s3en-230…
dylanzuber-scale3 May 23, 2024
ce20a07
adding property filtering (#123)
dylanzuber-scale3 May 24, 2024
3eb1132
optimizing cost function
dylanzuber-scale3 May 28, 2024
958946c
optimizing per cost per hour function
dylanzuber-scale3 May 28, 2024
cce94a2
removing console statements
dylanzuber-scale3 May 28, 2024
8671568
Merge pull request #125 from Scale3-Labs/dylan/s3en-2325-bug-gateway-…
dylanzuber-scale3 May 28, 2024
653585a
updating queryKey for datasets
dylanzuber-scale3 May 29, 2024
58a12e7
Merge pull request #126 from Scale3-Labs/dylan/s3en-2319-bugfix-datas…
dylanzuber-scale3 May 29, 2024
7305f9a
init advanced filter dialog
dylanzuber-scale3 May 29, 2024
a6c4652
adding operator combobox
dylanzuber-scale3 May 30, 2024
031e5d5
updating ui
dylanzuber-scale3 May 30, 2024
d24a435
adding attribute type
dylanzuber-scale3 May 30, 2024
bc878cd
bug fixes
dylanzuber-scale3 May 31, 2024
ea94ccb
cleanup
dylanzuber-scale3 May 31, 2024
a39e6af
remove console
dylanzuber-scale3 May 31, 2024
7d8755f
updating queryKeys
dylanzuber-scale3 May 31, 2024
26fe56f
Merge pull request #128 from Scale3-Labs/dylan/s3en-2331-update-langt…
dylanzuber-scale3 May 31, 2024
dcd2cac
adding missing table checks
dylanzuber-scale3 May 31, 2024
ff3166f
adding more checks
dylanzuber-scale3 May 31, 2024
b94dbb2
Merge pull request #129 from Scale3-Labs/dylan/add-table-checl
dylanzuber-scale3 May 31, 2024
2c70a24
chore: update clickhouse docker for user management
darshit-s3 Jun 4, 2024
579b161
style: remove blank space
darshit-s3 Jun 4, 2024
cda1d77
Merge pull request #131 from Scale3-Labs/update-clickhouse-docker
darshit-s3 Jun 4, 2024
8e7176b
updating save prompt button
dylanzuber-scale3 Jun 5, 2024
08b8bbe
Merge pull request #132 from Scale3-Labs/dylan/s3en-2359-save-button-…
dylanzuber-scale3 Jun 6, 2024
29eff4e
Merge pull request #122 from Scale3-Labs/dylan/s3en-2301-render-image…
dylanzuber-scale3 Jun 6, 2024
f520430
Redesign of Manual Evaluations (#134)
karthikscale3 Jun 7, 2024
a41a9f0
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jun 7, 2024
58431bc
Dylan/s3en 2318 add the ability to import a conversation from the tra…
dylanzuber-scale3 Jun 7, 2024
6111ef5
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jun 7, 2024
704a98e
Merge remote-tracking branch 'origin/development' into dylan/s3en-227…
dylanzuber-scale3 Jun 7, 2024
0d79362
storing
dylanzuber-scale3 Jun 7, 2024
267fa5d
remove import for images
dylanzuber-scale3 Jun 7, 2024
5b0f985
Merge pull request #135 from Scale3-Labs/dylan/s3en-2394-bugfix-impor…
dylanzuber-scale3 Jun 7, 2024
f5ecb80
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Jun 7, 2024
e63cf2f
fix merge conflict
karthikscale3 Jun 7, 2024
5e2a40a
Merge remote-tracking branch 'origin/development' into dylan/s3en-227…
dylanzuber-scale3 Jun 10, 2024
0ad8b79
importing attribute stuff
dylanzuber-scale3 Jun 11, 2024
a8c1a15
fixing operations display
dylanzuber-scale3 Jun 11, 2024
7e32102
cleaning up advanced filters
dylanzuber-scale3 Jun 11, 2024
68d8f39
cleanup
dylanzuber-scale3 Jun 11, 2024
440017e
docs: update docker instructions
darshit-s3 Jun 11, 2024
3c37313
Merge pull request #137 from Scale3-Labs/update-healthcheck-clickhouse
darshit-s3 Jun 11, 2024
84676cf
removing console, fixing button
dylanzuber-scale3 Jun 11, 2024
c05001f
Merge pull request #127 from Scale3-Labs/dylan/s3en-2278-implement-tr…
dylanzuber-scale3 Jun 11, 2024
663083a
add stars history (#139)
yemiadej Jun 12, 2024
b78cd3f
Dylan/s3en 2401 ability to filter by user for metrics and traces (#138)
dylanzuber-scale3 Jun 13, 2024
3f22fe3
Dylan/s3en 2350 aggregate metrics by models v2 (#141)
dylanzuber-scale3 Jun 13, 2024
b64f734
Automated Evaluations - Support for Inspect AI (#142)
karthikscale3 Jun 13, 2024
77d1bd5
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jun 13, 2024
948fefe
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Jun 13, 2024
0faf3ab
merge
karthikscale3 Jun 13, 2024
3aa0528
Bugfixes
karthikscale3 Jun 16, 2024
b4527aa
DSPy support (#144)
karthikscale3 Jun 17, 2024
76e1854
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jun 17, 2024
435f07d
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Jun 17, 2024
ac594bc
Merge branch 'development' into release
karthikscale3 Jun 17, 2024
f04abf1
Prompt registry and Playground integration (#146)
karthikscale3 Jun 20, 2024
a8678f6
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jun 20, 2024
c88e6c3
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Jun 20, 2024
8dda864
Merge branch 'development' into release
karthikscale3 Jun 20, 2024
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
86 changes: 43 additions & 43 deletions app/(protected)/project/[project_id]/prompts/[prompt_id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import CreatePromptDialog from "@/components/shared/create-prompt-dialog";
import { PromptInstructions } from "@/components/shared/setup-instructions";
import { Button } from "@/components/ui/button";
import { Checkbox } from "@/components/ui/checkbox";
import { Label } from "@/components/ui/label";
import { Separator } from "@/components/ui/separator";
import { Skeleton } from "@/components/ui/skeleton";
import { Switch } from "@/components/ui/switch";
import { cn } from "@/lib/utils";
import { Prompt } from "@prisma/client";
import CodeEditor from "@uiw/react-textarea-code-editor";
Expand Down Expand Up @@ -149,6 +149,48 @@ export default function Page() {
))}
</div>
<div className="flex flex-col gap-8 w-full">
<div className="flex flex-col gap-2">
<Label>Go Live</Label>
<div className="flex items-center gap-2 w-fit">
<Switch
checked={live}
onCheckedChange={async (checked) => {
setLive(checked as boolean);
try {
const payload = {
...selectedPrompt,
live: checked,
};
await fetch("/api/prompt", {
method: "PUT",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
});
await queryClient.invalidateQueries({
queryKey: ["fetch-prompts-query", promptsetId],
});
toast.success(
checked
? "This prompt is now live"
: "This prompt is no longer live. Make sure to make another prompt live"
);
} catch (error) {
toast.error("Failed to make prompt live", {
description:
error instanceof Error
? error.message
: String(error),
});
}
}}
/>
<p className="text-sm text-muted-foreground">
Make this version of the prompt live
</p>
</div>
</div>
<div className="flex flex-col gap-2">
<Label>Prompt Registry ID</Label>
<p className="p-2 rounded-md border-2 border-muted font-semibold text-md">
Expand Down Expand Up @@ -194,48 +236,6 @@ export default function Page() {
}}
/>
</div>
<div className="flex flex-col gap-2">
<Label>Go Live</Label>
<div className="flex items-center gap-2 w-fit">
<Checkbox
checked={live}
onCheckedChange={async (checked) => {
setLive(checked as boolean);
try {
const payload = {
...selectedPrompt,
live: checked,
};
await fetch("/api/prompt", {
method: "PUT",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
});
await queryClient.invalidateQueries({
queryKey: ["fetch-prompts-query", promptsetId],
});
toast.success(
checked
? "This prompt is now live"
: "This prompt is no longer live. Make sure to make another prompt live"
);
} catch (error) {
toast.error("Failed to make prompt live", {
description:
error instanceof Error
? error.message
: String(error),
});
}
}}
/>
<p className="text-sm text-muted-foreground">
Make this version of the prompt live
</p>
</div>
</div>
<div className="flex flex-col gap-2">
<Label>Use the Live prompt directly in your code</Label>
<PromptInstructions id={promptsetId} />
Expand Down
6 changes: 0 additions & 6 deletions app/(protected)/settings/keys/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ export default async function Page() {
if (!session || !session.user) {
redirect("/login");
}
const email = session?.user?.email as string;

const resp = await fetch(
`${process.env.NEXTAUTH_URL_INTERNAL}/api/user?email=${email}`
);
const user = await resp.json();

return (
<>
Expand Down
34 changes: 27 additions & 7 deletions app/api/promptset/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { authOptions } from "@/lib/auth/options";
import prisma from "@/lib/prisma";
import { authApiKey, fillPromptStringTemplate, parseQueryString } from "@/lib/utils";
import {
authApiKey,
fillPromptStringTemplate,
parseQueryString,
} from "@/lib/utils";
import { getServerSession } from "next-auth";
import { redirect } from "next/navigation";
import { NextRequest, NextResponse } from "next/server";
Expand All @@ -25,7 +29,10 @@ export async function GET(req: NextRequest) {
include: {
Prompt: {
where: {
OR: version !== undefined ? [{ version: version }] : [{ live: true }],
OR:
version !== undefined
? [{ version: version }]
: [{ live: true }],
},
},
},
Expand Down Expand Up @@ -57,26 +64,39 @@ export async function GET(req: NextRequest) {

livePromptVariables.forEach((key) => {
const value =
variables !== null ? variables[key as keyof typeof variables] ?? "" : "";
if (!variablesSet.has(`${key},${value.length > 0 ? value : "undefined"}`)) {
variables !== null
? variables[key as keyof typeof variables] ?? ""
: "";
if (
!variablesSet.has(
`${key},${value.length > 0 ? value : "undefined"}`
)
) {
errors.push(key);
}
});
if (errors.length > 0) {
const moreThanOneError = errors.length > 1;
return NextResponse.json(
{
error: `${moreThanOneError ? "Variables" : "Variable"} ${errors.join(", ")} ${moreThanOneError ? "are" : "is"} missing`,
error: `${
moreThanOneError ? "Variables" : "Variable"
} ${errors.join(", ")} ${
moreThanOneError ? "are" : "is"
} missing`,
},
{ status: 400 }
);
}
prompts[0].value = fillPromptStringTemplate(prompts[0].value, variables as Record<string, string>);
prompts[0].value = fillPromptStringTemplate(
prompts[0].value,
variables as Record<string, string>
);
}
return NextResponse.json({
...promptSet,
Prompt: undefined,
prompts: prompts
prompts: prompts,
});
} else {
const session = await getServerSession(authOptions);
Expand Down
50 changes: 41 additions & 9 deletions components/playground/common.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
"use client";

import PromptRegistryDialog from "@/components/playground/prompt-registry-dialog";
import LLMPicker from "@/components/shared/llm-picker";
import { Button } from "@/components/ui/button";
import { Separator } from "@/components/ui/separator";
import { LLM_VENDORS, LLM_VENDOR_APIS } from "@/lib/constants";
import {
CohereAIRole,
Conversation,
Expand All @@ -12,6 +11,7 @@ import {
import { cn } from "@/lib/utils";
import { ArrowTopRightIcon } from "@radix-ui/react-icons";
import { MinusCircleIcon, PlusIcon } from "lucide-react";
import Link from "next/link";
import { useEffect, useRef, useState } from "react";
import { useQuery } from "react-query";
import { toast } from "sonner";
Expand Down Expand Up @@ -84,7 +84,7 @@ export function ExpandingTextArea({
ref={textAreaRef}
defaultValue={value}
onChange={handleChange}
style={{ overflowY: "auto", resize: "none", height: "auto" }}
style={{ overflowY: "auto", height: "auto" }}
/>
<div className="absolute right-0 top-[-10px] py-2">
<Button
Expand Down Expand Up @@ -223,13 +223,45 @@ export function Message({

export function AddLLMChat({ onAdd }: { onAdd: (vendor: string) => void }) {
const [vendor, setVendor] = useState("");
const [busy, setBusy] = useState(false);
const [vendorKey, setVendorKey] = useState<string>("");

useEffect(() => {
if (typeof window === "undefined") return;
const keys = LLM_VENDORS.map((vendor) => {
const keyName = LLM_VENDOR_APIS.find(
(api) => api.label.toUpperCase() === vendor.value.toUpperCase()
);
if (!keyName) return null;
const key = window.localStorage.getItem(keyName.value.toUpperCase());
if (!key) return null;
return { value: keyName.value.toUpperCase(), label: vendor.label, key };
});
const venKey = keys.find((key) => key?.label.toLowerCase() === vendor);
setVendorKey(venKey?.key || "");
}, [busy, vendor]);

return (
<div className="w-[450px] h-[600px] rounded-lg border border-dashed border-muted-foreground flex items-center justify-center gap-1">
<LLMPicker setVendor={setVendor} />
<Button size={"sm"} onClick={() => onAdd(vendor)}>
Add
<PlusIcon className="ml-2 h-4 w-4" />
</Button>
<div className="w-[450px] h-[600px] rounded-lg border border-dashed border-muted-foreground flex flex-col items-center justify-center gap-4">
<div className="flex items-center gap-2">
<LLMPicker setVendor={setVendor} />
<Button
size={"sm"}
onClick={() => onAdd(vendor)}
disabled={vendorKey === "" || vendor === "" || busy}
>
Add
<PlusIcon className="ml-2 h-4 w-4" />
</Button>
</div>
{vendorKey === "" && (
<span className="text-sm font-semibold w-72">
Please add your {vendor} API key in the{" "}
<Link href="/settings/keys" className="underline text-blue-400">
settings page.
</Link>
</span>
)}
</div>
);
}
36 changes: 36 additions & 0 deletions components/playground/import-messages.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { cn } from "@/lib/utils";
import { DotsHorizontalIcon } from "@radix-ui/react-icons";
import { Button } from "../ui/button";
import ImportPrompt from "./import-prompt";
import ImportTraceConversation from "./import-trace-conversation";

export default function ImportMessages({
setMessages,
className = "",
}: {
setMessages: any;
className?: string;
}) {
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button
variant="outline"
size={"icon"}
className={cn(className, "bg-muted")}
>
<DotsHorizontalIcon />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent className="w-full flex flex-col gap-1">
<ImportTraceConversation setMessages={setMessages} />
<ImportPrompt setMessages={setMessages} />
</DropdownMenuContent>
</DropdownMenu>
);
}
Loading
Loading