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 3.0.5 #273

Merged
merged 206 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
206 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
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
28227d9
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
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
eae354d
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
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
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
1b9c986
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 9, 2024
31f50e6
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 9, 2024
4e30354
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
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
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
186f82b
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 13, 2024
2099f1d
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 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
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
63eb067
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 May 20, 2024
3a44486
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 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
5605411
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
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
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
020a3a9
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 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
a41a9f0
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jun 7, 2024
6111ef5
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 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
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
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
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
fa7fa4b
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jun 20, 2024
e52b4ff
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Jun 20, 2024
e731bd1
Merge branch 'development' into release
karthikscale3 Jun 20, 2024
416540b
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jun 25, 2024
05d1444
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Jun 25, 2024
47e2398
Merge branch 'development' into release
karthikscale3 Jun 25, 2024
b22a296
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jun 28, 2024
2d34b19
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jun 28, 2024
4e8a8f4
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jun 28, 2024
ecd2da3
Merge branch 'development' of github.com:Scale3-Labs/langtrace into r…
karthikscale3 Jun 28, 2024
46c1c8d
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Jun 28, 2024
cc0da10
Merge branch 'development' into release
karthikscale3 Jun 28, 2024
933523c
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 2, 2024
df85c41
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Jul 2, 2024
a6c05d0
Merge branch 'development' into release
karthikscale3 Jul 2, 2024
089b7a7
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 3, 2024
566fa31
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 3, 2024
a5f80cc
Fix merge
karthikscale3 Jul 3, 2024
e34cac7
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 3, 2024
01644fb
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 3, 2024
96af1b4
Merge branch 'development' into release
karthikscale3 Jul 3, 2024
66c2639
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 3, 2024
d9c28d3
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 3, 2024
837595e
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Jul 3, 2024
0e5e121
Update package lock
karthikscale3 Jul 3, 2024
653cbf9
Add migration file
karthikscale3 Jul 3, 2024
ff62b64
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 3, 2024
595ae4f
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Jul 3, 2024
65cf040
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 3, 2024
edb0f85
Merge branch 'development' into release
karthikscale3 Jul 3, 2024
997b625
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 8, 2024
e8d7126
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 12, 2024
16146a4
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Jul 12, 2024
423a6e3
Merge branch 'development' into release
karthikscale3 Jul 12, 2024
e197a31
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 12, 2024
a63974c
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 15, 2024
caccc0f
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 15, 2024
bac5dda
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 15, 2024
bc21dac
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Jul 15, 2024
8691757
Update readme
karthikscale3 Jul 15, 2024
71668e7
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 16, 2024
9e53f4a
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Jul 16, 2024
dd74f48
Merge branch 'development' into release
karthikscale3 Jul 16, 2024
2a51f9a
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 16, 2024
7682278
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 24, 2024
61c3604
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 24, 2024
ed1d122
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 25, 2024
11ab106
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Jul 25, 2024
5365db3
Merge
karthikscale3 Jul 25, 2024
24a7082
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 26, 2024
17cbcfc
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 27, 2024
34e9695
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Jul 28, 2024
7831f1d
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Aug 2, 2024
366b07a
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Aug 2, 2024
c2a4608
Merge branch 'development' into release
karthikscale3 Aug 2, 2024
d384d0a
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Aug 2, 2024
067d869
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Aug 2, 2024
94bfb83
Merge branch 'development' into release
karthikscale3 Aug 2, 2024
74b5772
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Aug 3, 2024
4fe9f92
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Aug 3, 2024
e8cb956
Merge branch 'development' into release
karthikscale3 Aug 3, 2024
b4137e1
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Aug 3, 2024
08bfc1f
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Aug 3, 2024
1d785e1
Merge branch 'development' into release
karthikscale3 Aug 3, 2024
1cf0eef
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Aug 14, 2024
7660f23
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Aug 14, 2024
89a5985
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Aug 14, 2024
b2dfb5e
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Aug 14, 2024
d48aa6a
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Aug 14, 2024
e34a5f9
Merge
karthikscale3 Aug 14, 2024
cacfbec
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Aug 14, 2024
726ddaf
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Aug 28, 2024
f5e885e
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Sep 4, 2024
3ef8659
Merge branch 'development' into release
karthikscale3 Sep 4, 2024
3bfa189
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Sep 4, 2024
3cd9440
Merge branch 'development' into release
karthikscale3 Sep 4, 2024
f08e3d2
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Sep 5, 2024
60d9ec6
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Sep 5, 2024
50c4c00
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Sep 5, 2024
329f39b
Merge branch 'development' into release
karthikscale3 Sep 5, 2024
685d76f
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Sep 5, 2024
5b902a5
Merge branch 'main' of github.com:Scale3-Labs/langtrace into release
karthikscale3 Sep 5, 2024
0fcc177
Merge branch 'development' into release
karthikscale3 Sep 5, 2024
ea5ae6a
adding ability to add to dataset from traces tab
dylanzuber-scale3 Sep 5, 2024
9590af0
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Sep 6, 2024
99e6f33
fixing z-index bug
dylanzuber-scale3 Sep 6, 2024
9baa4fc
fixing llm parsing, disable button for non llm traces
dylanzuber-scale3 Sep 6, 2024
a67a15d
Merge pull request #268 from Scale3-Labs/dylan/s3en-2771-add-to-datas…
dylanzuber-scale3 Sep 6, 2024
66098b1
cleaning up api providers page
dylanzuber-scale3 Sep 7, 2024
fefdf24
more bug fixes, auditing models
dylanzuber-scale3 Sep 8, 2024
a2fc439
Merge pull request #269 from Scale3-Labs/dylan/s3en-2780-audit-playgr…
dylanzuber-scale3 Sep 9, 2024
e6ece07
adding api key auth to create project api key (#270)
dylanzuber-scale3 Sep 10, 2024
62f0167
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Sep 10, 2024
27b0133
Improvements to prompt playground (#272)
dylanzuber-scale3 Sep 12, 2024
6410858
Merge branch 'development' of github.com:Scale3-Labs/langtrace into d…
karthikscale3 Sep 12, 2024
cfdc35c
merge
karthikscale3 Sep 12, 2024
3b5c063
Merge branch 'development' into release
karthikscale3 Sep 12, 2024
38168b6
fix
karthikscale3 Sep 12, 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
2 changes: 1 addition & 1 deletion app/(protected)/project/[project_id]/playground/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export default function Page() {
settings page.
</Link>
</span>
<div className="flex flex-row flex-wrap lg:grid lg:grid-cols-3 gap-8 w-full">
<div className="flex flex-row flex-wrap gap-8 w-full">
{llms.map((llm: ChatInterface) => (
<LLMChat
key={llm.id}
Expand Down
3 changes: 3 additions & 0 deletions app/(protected)/settings/keys/page-client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ export default function ApiKeys() {
onClick={() => {
if (typeof window === "undefined") return null;
window.localStorage.removeItem(vendor.value);
setVendorKeys((prevKeys) =>
prevKeys.filter((key) => key.value !== vendor.value)
);
toast.success("API Key removed");
}}
className="text-destructive"
Expand Down
10 changes: 9 additions & 1 deletion app/api/api-key/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { authOptions } from "@/lib/auth/options";
import prisma from "@/lib/prisma";
import { generateApiKey, hashApiKey } from "@/lib/utils";
import { generateApiKey, hashApiKey, authApiKey } from "@/lib/utils";
import { getServerSession } from "next-auth";
import { redirect } from "next/navigation";
import { NextRequest, NextResponse } from "next/server";
Expand All @@ -9,6 +9,14 @@ import { NextRequest, NextResponse } from "next/server";
export async function POST(req: NextRequest) {
const projectId = req.nextUrl.searchParams.get("project_id") as string;
const teamId = req.nextUrl.searchParams.get("team_id") as string;
// if user is generating an api key for their project through the api
const projectGenApiKey = req.headers.get("x-api-key");
if (projectGenApiKey !== null) {
const response = await authApiKey(projectGenApiKey, true);
if (response.status !== 200) {
return response;
}
}

if (!projectId && !teamId) {
return NextResponse.json(
Expand Down
20 changes: 13 additions & 7 deletions components/playground/common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ export function ExpandingTextArea({
};
}, []);

useEffect(() => {
const textarea = textAreaRef.current;
if (textarea) {
textarea.style.height = "auto";
textarea.style.height = `${textarea.scrollHeight}px`;
}
}, [value]);

const handleChange = (event: any) => {
const textarea = event.target;
onChange(textarea.value);
Expand All @@ -81,10 +89,10 @@ export function ExpandingTextArea({
};

return (
<div className="relative w-[290px]">
<div className="relative min-w-[350px]">
<textarea
disabled={busy}
className="rounded-md text-sm w-[290px] bg-background pr-10 pt-5"
className="rounded-md text-sm w-[350px] bg-background pr-10 pt-5"
ref={textAreaRef}
defaultValue={value}
onChange={handleChange}
Expand Down Expand Up @@ -177,20 +185,19 @@ export function Message({
</div>
<div
onClick={() => setEditing(true)}
className="min-w-[290px] min-h-6"
className="min-w-[350px] min-h-6"
>
{!editing && (
<p
className={cn(
"w-[290px] text-sm break-all",
"w-[350px] text-sm break-all",
!message.content && "text-muted-foreground"
)}
>
{message.content || "click to edit"}
</p>
)}
{editing && (
<div>
<ExpandingTextArea
onChange={(value: string) => {
setMessage({ ...message, content: value });
Expand All @@ -200,7 +207,6 @@ export function Message({
saveButtonRef={saveButtonRef}
handleSave={setDialogOpen}
/>
</div>
)}
</div>
</div>
Expand Down Expand Up @@ -246,7 +252,7 @@ export function AddLLMChat({ onAdd }: { onAdd: (vendor: string) => void }) {
}, [busy, vendor]);

return (
<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="w-[530px] 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
Expand Down
125 changes: 95 additions & 30 deletions components/playground/import-trace-conversation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ import { useEffect, useState } from "react";
import { useBottomScrollListener } from "react-bottom-scroll-listener";
import { useQuery } from "react-query";
import { toast } from "sonner";
import { ConversationRow } from "../project/traces/conversation-row";
import TraceRowSkeleton from "../shared/row-skeleton";
import { SetupInstructions } from "../shared/setup-instructions";
import { Spinner } from "../shared/spinner";
import { Button } from "../ui/button";

Expand Down Expand Up @@ -54,7 +51,7 @@ export default function ImportTraceConversation({
pageSize: PAGE_SIZE,
projectId: project_id,
filters: {
operation: "AND",
operation: "OR",
filters: [
{
key: "langtrace.service.type",
Expand Down Expand Up @@ -91,7 +88,6 @@ export default function ImportTraceConversation({

if (currentData.length > 0) {
const updatedData = [...currentData, ...newData];

setCurrentData(updatedData);
} else {
setCurrentData(newData);
Expand All @@ -111,8 +107,75 @@ export default function ImportTraceConversation({
enabled: enableFetch,
});

const parseTraceData = (trace: any) => {
let model = "";
let promptFinal: string = "";
let responseFinal: string = "";

for (const span of trace) {
if (span.attributes) {
const attributes = JSON.parse(span.attributes);

if (span.events) {
const events: any[] = JSON.parse(span.events);

const promptEvent = events.find(
(event: any) => event.name === "gen_ai.content.prompt"
);
if (promptEvent?.attributes?.["gen_ai.prompt"]) {
const promptJSONString = promptEvent.attributes["gen_ai.prompt"];
const promptsJSON = JSON.parse(promptJSONString);
promptFinal = promptsJSON[0].content || "";
}

const responseEvent = events.find(
(event: any) => event.name === "gen_ai.content.completion"
);
if (responseEvent?.attributes?.["gen_ai.completion"]) {
const responseJSONString =
responseEvent.attributes["gen_ai.completion"];
const responseJSON = JSON.parse(responseJSONString);
responseFinal = responseJSON[0].content || "";
}
}

if (!model) {
model =
attributes["gen_ai.response.model"] ||
attributes["gen_ai.request.model"] ||
attributes["llm.model"] ||
"";
}
}
}

return { model, promptFinal, responseFinal };
};

const handleRowClick = (promptFinal: string, responseFinal: string) => {
if (promptFinal.length && responseFinal.length) {
const inputMessage = { role: "user", content: promptFinal };
const outputMessage = { role: "assistant", content: responseFinal };

setMessages([inputMessage, outputMessage]);
setOpenDialog(false);
}
};

return (
<Dialog open={openDialog} onOpenChange={setOpenDialog}>
<Dialog
open={openDialog}
onOpenChange={(isOpen) => {
setOpenDialog(isOpen);
if (isOpen) {
setShowLoader(true);
setCurrentData([]);
setPage(1);
setTotalPages(1);
setEnableFetch(true);
}
}}
>
<DialogTrigger>
<Button
type="button"
Expand All @@ -132,19 +195,12 @@ export default function ImportTraceConversation({
<Label htmlFor="name" className="text-left text-lg mb-4">
Select a conversation to import
</Label>
<div className="grid grid-cols-12 items-center p-3 bg-muted">
<p className="ml-10 text-xs font-medium">
Time <span>&#8595;</span> Local
</p>
<p className="text-xs font-medium">Namespace</p>
<p className="text-xs font-medium">Model</p>
<p className="text-xs font-medium col-span-2">Input</p>
<p className="text-xs font-medium col-span-2">Output</p>
<p className="text-xs font-medium">User ID</p>
<p className="text-xs font-medium">Input / Output / Total Tokens</p>
<p className="text-xs font-medium">Token Cost</p>
<p className="text-xs font-medium">Duration(ms)</p>
<div className="grid grid-cols-13 items-center p-3 bg-muted">
<p className="col-span-2 text-xs font-medium">Model</p>
<p className="col-span-5 text-xs font-medium">Input</p>
<p className="col-span-5 text-xs font-medium">Output</p>
</div>

{fetchTraces.isLoading || !fetchTraces?.data || !currentData ? (
<PageSkeleton />
) : (
Expand All @@ -155,17 +211,23 @@ export default function ImportTraceConversation({
{!fetchTraces.isLoading &&
fetchTraces?.data &&
currentData?.map((trace: any, i: number) => {
const { model, promptFinal, responseFinal } =
parseTraceData(trace);

return (
<div key={i} className="px-3">
<ConversationRow
trace={trace}
utcTime={false}
importTrace={true}
setMessages={(messages: any[]) => {
setMessages(messages);
setOpenDialog(false);
}}
/>{" "}
<div
key={i}
className="px-3 py-4 hover:bg-accent cursor-pointer grid grid-cols-12 items-center gap-y-4 gap-x-4"
onClick={() => handleRowClick(promptFinal, responseFinal)}
>
<p className="col-span-2 text-xs">{model}</p>

<p className="col-span-4 text-xs overflow-hidden max-h-[3.5rem] line-clamp-3 break-words">
{promptFinal}
</p>
<p className="col-span-5 text-xs overflow-hidden max-h-[3.5rem] line-clamp-3 break-words">
{responseFinal}
</p>
</div>
);
})}
Expand All @@ -186,7 +248,6 @@ export default function ImportTraceConversation({
No traces available. Get started by setting up Langtrace
in your application.
</p>
<SetupInstructions project_id={project_id} />
</div>
)}
</div>
Expand All @@ -201,7 +262,11 @@ function PageSkeleton() {
return (
<div className="flex flex-col gap-3 rounded-md border border-muted max-h-screen">
{Array.from({ length: 3 }).map((_, index) => (
<TraceRowSkeleton key={index} />
<div key={index} className="px-3 py-2 grid grid-cols-12 items-center">
<div className="col-span-3 bg-muted h-4 w-full rounded-sm" />
<div className="col-span-4 bg-muted h-4 w-full rounded-sm" />
<div className="col-span-5 bg-muted h-4 w-full rounded-sm" />
</div>
))}
</div>
);
Expand Down
24 changes: 15 additions & 9 deletions components/playground/llmchat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default function LLMChat({
}, [initialPrompt]);

return (
<Card className="w-[450px] h-[600px] p-1 relative group/card">
<Card className="w-[530px] h-[600px] p-1 relative group/card">
<div className="overflow-y-scroll h-[535px]">
{localLLM.settings.messages.map((message, i) => (
<Message
Expand All @@ -133,11 +133,17 @@ export default function LLMChat({
);
setLocalLLM({
...localLLM,
settings: { ...localLLM.settings, messages: localNewMessages },
settings: {
...localLLM.settings,
messages: localNewMessages,
},
});
setLLM({
...localLLM,
settings: { ...localLLM.settings, messages: localNewMessages },
settings: {
...localLLM.settings,
messages: localNewMessages,
},
});
}}
onRemove={() => {
Expand Down Expand Up @@ -204,6 +210,12 @@ export default function LLMChat({
Add message
</Button>
<ImportMessages setMessages={setMessages} className="mt-2" />
{(cost || latency) && (
<div className="absolute bottom-[10px] right-4 flex flex-col gap-1 bg-muted rounded-md p-1 w-[130px]">
<p className="text-xs">{`Cost: ${cost}`}</p>
<p className="text-xs break-all">{`Latency: ${latency}ms`}</p>
</div>
)}
</div>
</div>
<div className="absolute -top-6 -left-3">
Expand Down Expand Up @@ -658,12 +670,6 @@ export default function LLMChat({
{!busy && <LucideChevronRight className="ml-2 h-4 w-4" />}
</Button>
)}
{(cost || latency) && (
<div className="absolute bottom-14 right-4 flex flex-col gap-2 bg-primary-foreground rounded-md p-2 w-[115px] shadow-md">
<p className="text-xs">{`Cost: ${cost}`}</p>
<p className="text-xs break-all">{`Latency: ${latency}ms`}</p>
</div>
)}
</Card>
);
}
2 changes: 1 addition & 1 deletion components/project/dataset/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function CreateDataset({
Create Dataset <PlusIcon className="ml-2" />
</Button>
</DialogTrigger>
<DialogContent className="sm:max-w-[425px]">
<DialogContent className="z-[920] sm:max-w-[425px]">
<DialogHeader>
<DialogTitle>Create Dataset</DialogTitle>
<DialogDescription>
Expand Down
Loading
Loading