Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
239 commits
Select commit Hold shift + click to select a range
59c599f
Fix model routing (#161)
MichaelDoyle Feb 27, 2024
a92bdae
[UI] Add new span tree + viewer to Flow details page (#164)
tonybaroneee Feb 27, 2024
8fb9144
Fetch models from API (#174)
MichaelDoyle Feb 28, 2024
7bf826c
Backend errors (#163)
MaesterChestnut Feb 28, 2024
ca94c45
[UI] Cleanup unimplemented pages from navbar (#180)
tonybaroneee Feb 28, 2024
9d90ca0
[UI] Increase max-height of flow input/output (#179)
tonybaroneee Feb 28, 2024
ed6ab19
Move flow runner to Actions page (#176)
shrutip90 Feb 28, 2024
95b4c60
[UI] Fix overflow of execution span tree (#183)
tonybaroneee Feb 28, 2024
8977bb7
Input validation disables prompt run button (#182)
MaesterChestnut Feb 28, 2024
9f53dde
Route playground from flows to action runners page (#191)
MichaelDoyle Feb 29, 2024
c145f96
Switch temperature to the slider (#195)
MichaelDoyle Feb 29, 2024
f3c9593
Show validation errors on the playground (#196)
MichaelDoyle Feb 29, 2024
5976078
[UI] Revamp flow details page layout (#197)
tonybaroneee Feb 29, 2024
0cd9569
Fix validator issues (#194)
shrutip90 Feb 29, 2024
0a35f00
[UI] Initial design of span details view (#199)
tonybaroneee Feb 29, 2024
c7dfaef
Move flow runner to start from action-list instead of action-runner (…
shrutip90 Feb 29, 2024
f99d706
Add vertex-ai to the model playground (#201)
MichaelDoyle Feb 29, 2024
500a3c7
[UI] Hide input/output pre if none available (#204)
tonybaroneee Feb 29, 2024
d4083e4
[UI] Add "muted" helper class for secondary text (#206)
tonybaroneee Feb 29, 2024
88e9d35
Don't send blank stop sequences to the model, vertex gemini model doe…
pavelgj Mar 3, 2024
0cf4621
Provider specific model param restrictions on input (#224)
MaesterChestnut Mar 5, 2024
515e66d
Use the minfied version of Monaco Editor in the angular app (#242)
MichaelDoyle Mar 6, 2024
157fa80
[UI] Update app name
tonybaroneee Mar 6, 2024
3a55b2b
[UI] Update flow details layout (#246)
tonybaroneee Mar 6, 2024
3ea1859
[UI] Add callout component (#244)
tonybaroneee Mar 6, 2024
d9535dd
[UI] Hide wrapper spans on details page (#254)
tonybaroneee Mar 6, 2024
7e8699f
[UI] Update flow durations on details page (#256)
tonybaroneee Mar 6, 2024
64f4c62
[UI] Show error on flow details page (#258)
tonybaroneee Mar 7, 2024
6a48b65
Playground load trace (#262)
MichaelDoyle Mar 7, 2024
f4029a7
Add theme toggling for JSON editor and move schema to a tab next to t…
shrutip90 Mar 7, 2024
6e45192
Give topP the slider treatment (#264)
MichaelDoyle Mar 7, 2024
9853760
[UI] Show flow name in tree (#266)
tonybaroneee Mar 7, 2024
52692ec
[UI] Show span state in details pane (#268)
tonybaroneee Mar 7, 2024
98b4a1c
[UI] Flows table style improvements (#269)
tonybaroneee Mar 7, 2024
656d3cc
[UI] Small flow details page improvements for narrow screens (#273)
tonybaroneee Mar 7, 2024
cf3991f
Add CustomOptions (#276)
MichaelDoyle Mar 8, 2024
d7a86f0
[UI]Remove sample calls for unsupported actions. Small fixes in flow …
shrutip90 Mar 8, 2024
172148b
Create Message sub component for ModelPlayground (#271)
MaesterChestnut Mar 8, 2024
29d353a
Fix error with model not accepting request_format (#279)
huangjeff5 Mar 8, 2024
877d3c7
Disable the minimap on the monaco editor (#286)
MichaelDoyle Mar 8, 2024
6f5279e
[UI] Add zero state for flows list page (#291)
tonybaroneee Mar 9, 2024
6a932ad
[UI] Fix ng error in flow runner (#297)
tonybaroneee Mar 11, 2024
b4a2019
[UI] Hide stream response checkbox for durable flows (#299)
tonybaroneee Mar 11, 2024
56db2e2
Integrating the Message component into the Prompt Playground
MaesterChestnut Mar 11, 2024
d527b54
Switch model select from native to mat-select (#306)
MichaelDoyle Mar 12, 2024
7e99dfd
Ability to show errors on actions page (#307)
MichaelDoyle Mar 12, 2024
6c6633a
[UI] Revamp Actions list UI (#308)
tonybaroneee Mar 12, 2024
079029e
[UI] Remove unnecessary return (#309)
tonybaroneee Mar 12, 2024
a8f58c7
[UI] Prevent selecting action if no param is set (#310)
tonybaroneee Mar 12, 2024
6cba77e
Enable support for multiple messages coming from traceId (#314)
MaesterChestnut Mar 12, 2024
490e173
Avoid making flow runner editors read only (#321)
shrutip90 Mar 12, 2024
8848671
[UI] Add filtering and expand/collapse all to actions list (#319)
tonybaroneee Mar 13, 2024
85b739d
Fix error where model selection does not update (#323)
MichaelDoyle Mar 13, 2024
81ab1f9
[UI] Fix action search input style (#325)
tonybaroneee Mar 13, 2024
bfde202
[UI] Update action list name and key display (#328)
tonybaroneee Mar 13, 2024
abf3a16
User error callout component on model playground (#330)
MichaelDoyle Mar 13, 2024
8434a9c
refactor the code around checking for json output support (#304)
huangjeff5 Mar 13, 2024
b62657a
Render images in chat (#340)
MichaelDoyle Mar 13, 2024
d9c8978
Functioning add and remove button (#335)
MaesterChestnut Mar 13, 2024
7715a8c
Refactor criteria/validation logic out of playground component (#339)
MaesterChestnut Mar 13, 2024
149ca45
[UI] Flow runner UI polish + improvements (#343)
tonybaroneee Mar 13, 2024
320062a
Move JSON editor to shared components since retriever playground also…
shrutip90 Mar 13, 2024
1b1401e
[UI] Small handful of UI nit fixes (#345)
tonybaroneee Mar 14, 2024
317b79d
[UI] Add loading state to flows table (#349)
tonybaroneee Mar 14, 2024
bf047aa
Do not load output from trace; typically we're interested in loading …
MichaelDoyle Mar 14, 2024
bce99de
Make response_format optional (#350)
MichaelDoyle Mar 14, 2024
bbd698c
[UI] Add Genkit icon (#371)
tonybaroneee Mar 14, 2024
75b87c2
Reset streamed chunks when rerunning the streamed flow (#379)
pavelgj Mar 14, 2024
37e9934
[UI] Add tooltips to span state icons (#351)
tonybaroneee Mar 14, 2024
adc4b5f
Prefer includes over contains (#376)
tagboola Mar 14, 2024
5580231
[UI] Add inspect flow state button if flow errors (#382)
tonybaroneee Mar 14, 2024
dd1d92b
Chat mode (#391)
MaesterChestnut Mar 15, 2024
7280681
Ability to open Flow runner from the trace view (#394)
MichaelDoyle Mar 15, 2024
09cc900
Add basics of the eval runner page (#367)
ssbushi Mar 15, 2024
9380caf
[UI] Fix flow details sidebar colors in dark mode (#399)
tonybaroneee Mar 15, 2024
af830fa
[UI] Revamp model playground to chat-based layout (#397)
tonybaroneee Mar 15, 2024
e0e0a4e
[UI] Flow runner: Add a callout for no output so we dont show empty r…
shrutip90 Mar 15, 2024
553817d
[UI] Add trace details view (#405)
tonybaroneee Mar 15, 2024
a1d337f
role:system message allowed for models (#402)
MaesterChestnut Mar 18, 2024
a2b2572
Adds support for image models. (#426)
mbleigh Mar 18, 2024
635fb79
fix playground runner after runAction change (#429)
MaesterChestnut Mar 18, 2024
e03d359
Revert "fix playground runner after runAction change (#429)" (#431)
MaesterChestnut Mar 18, 2024
549ffbe
Small tweaks to model playground to reduce chat (#438)
MichaelDoyle Mar 19, 2024
535040a
[UI] Update `stackTraceSpans` to filter out internal spans (#439)
tonybaroneee Mar 19, 2024
0d597c5
[UI] Add traces table to inspect index page (#448)
tonybaroneee Mar 19, 2024
9be4c2f
Adding traces to Messages (#432)
MaesterChestnut Mar 19, 2024
f260f23
[UI] Update routing for inspect pages (#449)
tonybaroneee Mar 19, 2024
8ff5d6b
[UI] Update routing for run pages (#450)
tonybaroneee Mar 19, 2024
e0bd582
[UI] Fix trace display name in table (#451)
tonybaroneee Mar 19, 2024
1d63de4
Allow size to be optional (#452)
MichaelDoyle Mar 19, 2024
0d17f05
[UI] Fix trace deep links in model playground (#453)
tonybaroneee Mar 19, 2024
111be83
[UI] Add raw mat-table for evals view (#430)
ssbushi Mar 19, 2024
4131f03
Add embeddings models (#303)
huangjeff5 Mar 19, 2024
a818995
[UI] Update /evaluations route to /evaluate (#454)
tonybaroneee Mar 19, 2024
76f401d
[UI] Make all run buttons consistent in playgrounds (#455)
tonybaroneee Mar 19, 2024
1df184d
[UI] Add cmd/ctrl + enter shortcut to playground editors (#456)
tonybaroneee Mar 19, 2024
7547bf7
[UI] Add landing state for Run page (#465)
tonybaroneee Mar 19, 2024
1c544fb
[UI] Prevent mat-slider from shrinking (#473)
tonybaroneee Mar 20, 2024
40db877
[UI] Adjust element widths for narrow browsers (#474)
tonybaroneee Mar 20, 2024
696ddd7
[UI] Prevent welcome page flicker on action refresh (#475)
tonybaroneee Mar 20, 2024
d387807
Add tab for Auth input to Flow Runner action (#467)
MaesterChestnut Mar 20, 2024
5a5142d
[UI] Add JSON sample to flow runner (#479)
tonybaroneee Mar 20, 2024
6fb2159
Generic action runner (#484)
MichaelDoyle Mar 20, 2024
a73c32f
[UI] Add support for tool primitive on dev UI run page (#488)
tonybaroneee Mar 20, 2024
e8c41a1
[UI] Tighten up spacing of actions list items (#489)
tonybaroneee Mar 20, 2024
dbd97a2
[UI] Trigger change detection on flow runner response (#486)
tonybaroneee Mar 20, 2024
4f999f6
[UI] Add cmd/ctrl + enter shortcut to model playground (#485)
tonybaroneee Mar 20, 2024
cbe9fe1
[UI] Update eval results UI to use expandable cards for results (#491)
shrutip90 Mar 20, 2024
312370c
[UI] Prevent scrolling past last line in monaco editor (#495)
tonybaroneee Mar 21, 2024
c9b39d9
[UI] Use helper class to style pre stacktrace in callout (#502)
tonybaroneee Mar 21, 2024
07a6e33
[UI]Evals UI: Update inputs to use a table format (#496)
shrutip90 Mar 21, 2024
93d4749
[UI] Model playground message styling polish (#515)
tonybaroneee Mar 21, 2024
f9b6eb7
[UI] Fix json editor to ignore initial value if no schema (#517)
tonybaroneee Mar 21, 2024
b8da207
[UI] Set retriever name in playground header (#518)
tonybaroneee Mar 21, 2024
d3cc8ab
[UI] Prevent JSON sample pre-fill if unnecessary (#520)
tonybaroneee Mar 21, 2024
b98183d
Remove fdescribe in tests (#532)
ssbushi Mar 22, 2024
8f65d98
Fix minor UI elements in eval page (#533)
ssbushi Mar 22, 2024
9d57c8b
Add inspect trace option (#540)
ssbushi Mar 22, 2024
262521c
Add inspect tab in the Dev UI (#546)
ssbushi Mar 22, 2024
b2a417a
hide inspect button if no traces (#548)
ssbushi Mar 22, 2024
dd06198
[UI] Add typewriter effect to welcoem message (#554)
tonybaroneee Mar 23, 2024
390e620
[UI] Tweak logo kerning (#555)
tonybaroneee Mar 24, 2024
ea1f2c2
[UI] UI polish for evaluate page (#553)
tonybaroneee Mar 24, 2024
107b0a8
[UI] Fix issue in action runner JSON pre-fill (#559)
tonybaroneee Mar 24, 2024
e267956
[UI] Update typewriter animation to move left-to-right (#560)
tonybaroneee Mar 25, 2024
ad1d4ec
[UI] Show custom metadata attributes last in span details (#563)
tonybaroneee Mar 25, 2024
a57a774
[UI] Polish for eval result details pane (#564)
tonybaroneee Mar 25, 2024
b0e1bfa
Add support for text-embeddings (#538)
huangjeff5 Mar 25, 2024
f2328a9
[UI] Update default font to Google Sans (#565)
tonybaroneee Mar 25, 2024
f60139b
[UI] Update span attributes styling (#568)
tonybaroneee Mar 25, 2024
00fa2c4
[UI] Update border radius globally (#573)
tonybaroneee Mar 25, 2024
310ea75
[UI] Clip model playground message loading bar to card radius (#576)
tonybaroneee Mar 25, 2024
fbfff64
[UI] Prevent shrinkage of breadcrumb chevron (#577)
tonybaroneee Mar 25, 2024
541ac5c
[UI] Upgrade angular deps to ^17.3.1 (#587)
tonybaroneee Mar 26, 2024
14ef01f
[UI] Add logo lockup to app bar (#588)
tonybaroneee Mar 26, 2024
80dff69
[UI] Fix table not rendering for errored traces (#607)
tonybaroneee Mar 26, 2024
ae1aaa0
[UI] Render base64-encoded images in span output (#606)
tonybaroneee Mar 26, 2024
db62bf9
[UI] Update label of expand text button (#608)
tonybaroneee Mar 26, 2024
6d16d98
[UI] Update lockup with new svg asset (#623)
tonybaroneee Mar 27, 2024
c940ee7
[Eval bugbash] Update tooltip to definitions, visible on entire chip …
ssbushi Mar 27, 2024
091c88a
[Eval bugbash] Show errors as errors in eval UI (#626)
ssbushi Mar 27, 2024
db41f3e
[Eval bugbash] Only show icon if failed evaluator (#635)
ssbushi Mar 27, 2024
3721208
[UI] Fix trace timing display now that they are millis (#638)
tonybaroneee Mar 27, 2024
445c370
[UI] Fix JSON editor to show up for optional inputs as well (#613)
shrutip90 Mar 28, 2024
177cb2a
Add trace id to model playground when error occurs (#631)
MaesterChestnut Mar 28, 2024
8025690
Display context strings separately instead of a big array (#658)
shrutip90 Mar 28, 2024
c757cec
[UI]: Update date format to medium (#659)
shrutip90 Mar 28, 2024
a4b7eaa
Update error tooltip (#665)
ssbushi Mar 29, 2024
917e328
[UI] Tighten up kerning on mat tab labels (#680)
tonybaroneee Mar 29, 2024
4527f4b
[UI] Allow resizing of .pre-container and json editor (#682)
tonybaroneee Mar 29, 2024
494905d
[UI] Add tooltips to temperature and top_p controls (#683)
tonybaroneee Mar 29, 2024
caff283
[UI] Fix JSON sample autofill in retriever playground (#684)
tonybaroneee Mar 29, 2024
d6116d1
[UI] Improve model playground param labels and add tooltips (#686)
tonybaroneee Mar 29, 2024
329b44c
[UI] Fix trace status in table (#687)
tonybaroneee Mar 29, 2024
3295717
[UI] Update model icon to sparks (#688)
tonybaroneee Mar 29, 2024
40233d2
[UI] Add action type to runner page title (#690)
tonybaroneee Mar 29, 2024
a5b805d
[UI] Add title and close button to expand text dialog (#691)
tonybaroneee Mar 29, 2024
4000487
[UI] Remove redundant title from action runner (#692)
tonybaroneee Mar 29, 2024
465951c
Pass thru options to API (#695)
huangjeff5 Mar 29, 2024
a20b443
Bump ragas to 0.0.6 (#719)
pavelgj Mar 30, 2024
5f86cb6
[UI] Cleanup system prompt styling in model playground (#725)
tonybaroneee Apr 1, 2024
f471a7f
Update system/message placeholders (#727)
MichaelDoyle Apr 1, 2024
317289f
Update Eval Error handling (#685)
MaesterChestnut Apr 1, 2024
08eaae6
Clarifying label on button formerly known as "Open in Playground" (#636)
maxl0rd Apr 2, 2024
82b3148
[UI] Fix callout content not stretching to fit width (#757)
tonybaroneee Apr 2, 2024
44daaaf
[UI]: Add metrics table in evals results card (#747)
shrutip90 Apr 2, 2024
9729e66
[UI] Add support for specifying model version in playground (#760)
tonybaroneee Apr 2, 2024
8bd8066
[UI] Remove Evaluate tab in top nav bar (#765)
tonybaroneee Apr 2, 2024
2f075f6
[UI] Use flask icon for Evaluate tab (#772)
tonybaroneee Apr 2, 2024
df14113
[UI] Style updates to eval result details (#790)
tonybaroneee Apr 3, 2024
5638995
[UI] Render eval metric name in error callout consistently (#792)
tonybaroneee Apr 3, 2024
bd0e8bb
[UI] Fix span duration display (#797)
tonybaroneee Apr 3, 2024
2b3b382
Show safety errors in the model runner (#800)
MichaelDoyle Apr 3, 2024
fe788cf
Rename model playground => runner (#803)
MichaelDoyle Apr 3, 2024
0832e4f
Rename retriever playground => runner (#805)
MichaelDoyle Apr 3, 2024
03c5d56
[UI] Adjust metrics table to be full-width (#810)
tonybaroneee Apr 4, 2024
cbe3eb3
[UI] Only show eval zero state when loaded (#811)
tonybaroneee Apr 4, 2024
4535531
[UI] Set All traces as default in Inspect view (#812)
tonybaroneee Apr 4, 2024
8759b3d
[UI] ThemeToggleService unit tests (#816)
shrutip90 Apr 4, 2024
7b48c85
[UI] Make spans deep-linkable in trace + flow details views (#819)
tonybaroneee Apr 4, 2024
0605d31
[UI] Update model runner title to use selected model in config (#822)
tonybaroneee Apr 4, 2024
09b818e
[UI] Clear out images from data-rendered upon receiving new input (#840)
tonybaroneee Apr 4, 2024
4038e4c
[UI] Hide append mode for models that do not support multiturn (#847)
tonybaroneee Apr 5, 2024
ccb0360
[UI] Show banner for unsupported models (#848)
tonybaroneee Apr 5, 2024
ce0f6c9
[UI] Reset scroll position of input/output when switching spans (#852)
tonybaroneee Apr 5, 2024
79c4bc3
[UI] Hide "Add message" if model does not support multiturn (#853)
tonybaroneee Apr 5, 2024
7d937d4
Fix missed version 0.5.0-rc.1 (#858)
pavelgj Apr 5, 2024
5a165f1
[UI] Fix display of system prompt (#860)
tonybaroneee Apr 5, 2024
ddb6c0a
[UI] Fix tools icon (#862)
tonybaroneee Apr 5, 2024
5c8a33e
[UI] Prevent stuck browser back when redirecting to first evaluation …
tonybaroneee Apr 7, 2024
703fc06
[UI] Add missing app text color style (#16)
tonybaroneee Apr 8, 2024
716bf1c
[UI] Apply theme to scrollbars (#20)
tonybaroneee Apr 9, 2024
998216f
[UI] Clarify ID in flows/traces tables (#23)
tonybaroneee Apr 10, 2024
118ce13
[UI] Show flow error in trace details view, if applicable (#28)
tonybaroneee Apr 10, 2024
54dce1b
[UI] Fix eval zero state callout spacing (#24)
tonybaroneee Apr 10, 2024
45e208f
Export textEmbedding (#36)
huangjeff5 Apr 11, 2024
948f042
[UI] Update README doc with up-to-date instructions (#50)
tonybaroneee Apr 11, 2024
3600beb
[UI] Create skeleton prompt runner component (#54)
tonybaroneee Apr 12, 2024
b153ed4
[UI] Add icon to all view trace buttons (#57)
tonybaroneee Apr 12, 2024
f1f5137
[UI] Show template in prompt runner next to input (#58)
tonybaroneee Apr 12, 2024
fad6b0c
[UI] Use button toggle group for inspect table filter (#56)
tonybaroneee Apr 12, 2024
4a59e04
[UI] Update play icon for run/dispatch span states (#60)
tonybaroneee Apr 12, 2024
26bff08
More sensible default model params (#65)
MichaelDoyle Apr 16, 2024
768b094
Always clear message when not in chat mode - otherwise if an error is…
MichaelDoyle Apr 16, 2024
2125ce7
[UI] Show raw prompt template in modal (#70)
tonybaroneee Apr 16, 2024
cc5e0f7
Nesting user input in prompt runner (#72)
maxl0rd Apr 16, 2024
547f028
[UI] Add support for prompt variants (#74)
tonybaroneee Apr 17, 2024
a4a0931
Allow system role for Gemini 1.5 Pro (#85)
tonybaroneee Apr 17, 2024
20cdbce
Create modular component for a multi-modal message (#83)
MichaelDoyle Apr 17, 2024
6a761f3
Update faithfulness to v0.1.7 (#87)
ssbushi Apr 17, 2024
d006dfe
[UI] Add prompt variant to query params to support deep-linking (#88)
tonybaroneee Apr 18, 2024
afe7fea
[UI] Fix race condition when setting content in monaco (#96)
tonybaroneee Apr 18, 2024
dab3938
[UI] Small visual fix in app nav bar (#98)
tonybaroneee Apr 18, 2024
d2994b4
[UI] Fix incorrect height for modal runner header (#101)
tonybaroneee Apr 18, 2024
4fc9db4
[UI] Update placeholder label for model version select (#100)
tonybaroneee Apr 18, 2024
b99e447
Message list component (#84)
MichaelDoyle Apr 18, 2024
ac92038
[UI] Fix view evaluation report button to read correct metdata (#119)
tonybaroneee Apr 19, 2024
590eca7
[UI] Save action sidebar expansion state to `localStorage` (#120)
tonybaroneee Apr 19, 2024
5d87111
[UI]: Move model config params to a separate component (#103)
shrutip90 Apr 19, 2024
618d107
[UI] Update model runner to use the new model config component (#124)
shrutip90 Apr 19, 2024
f45e656
[UI] Pull the new defaults for model config into the new config compo…
shrutip90 Apr 19, 2024
08eb2d6
[UI] Add ability to export prompt file from model runner (#115)
tonybaroneee Apr 19, 2024
c49cbc0
[UI] Fix model versions not being loaded on initial render (#131)
tonybaroneee Apr 21, 2024
e9c2ac3
Integrate the new MessageList component into the ModelRunner (#114)
MichaelDoyle Apr 21, 2024
5185143
[UI] Refactor model-config to use signals (#133)
tonybaroneee Apr 22, 2024
2d5730b
Create placeholder for system prompt and first user message (#144)
MichaelDoyle Apr 22, 2024
94c4306
[UI] Remove oops from model config template (#143)
tonybaroneee Apr 22, 2024
dbfed9e
Ensure selected model is set when using left nav (#148)
MichaelDoyle Apr 22, 2024
67df20e
[UI] Prevent button icons from flex-shrinking (#151)
tonybaroneee Apr 22, 2024
b6753b4
Show large multimedia in a modal (#156)
MichaelDoyle Apr 23, 2024
cf01937
Enable all image types in model runner (#160)
MichaelDoyle Apr 23, 2024
1a2ea20
Re-enable gemini vision models (#168)
MichaelDoyle Apr 23, 2024
ef1bfb3
[UI] Remove system prompt for single-turn models (#169)
shrutip90 Apr 23, 2024
c464752
Set a reasonable (but arbitrary) number of media files per message (#…
MichaelDoyle Apr 24, 2024
381425b
[UI] Remove obsolete MONACO_PATH provider (unused) (#182)
tonybaroneee Apr 24, 2024
69416cf
[UI] Sort eval metrics for consistent/comparable viewing (#209)
tonybaroneee Apr 28, 2024
3261847
change action latency name (#200)
jba May 1, 2024
2a1f31f
Add vertex evaluator information to docs
tagboola May 1, 2024
a171f0b
Address PR comments
tagboola May 2, 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
44 changes: 43 additions & 1 deletion docs/plugins/vertex-ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ through the [Vertex AI API](https://cloud.google.com/vertex-ai/generative-ai/doc
- Imagen2 image generation
- Gecko text embedding generation

It also provides access to subset of evaluation metrics through the Vertex AI [Rapid Evaluation API](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/evaluation).

- [Safety](https://cloud.google.com/vertex-ai/docs/reference/rest/v1beta1/projects.locations/evaluateInstances#safetyinput)
- [Groundeness](https://cloud.google.com/vertex-ai/docs/reference/rest/v1beta1/projects.locations/evaluateInstances#groundednessinput)
- [ROUGE](https://cloud.google.com/vertex-ai/docs/reference/rest/v1beta1/projects.locations/evaluateInstances#rougeinput)
- [BLEU](https://cloud.google.com/vertex-ai/docs/reference/rest/v1beta1/projects.locations/evaluateInstances#bleuinput)

## Installation

```posix-terminal
Expand Down Expand Up @@ -66,6 +73,8 @@ credentials.

## Usage

### Generative AI Models

This plugin statically exports references to its supported generative AI models:

```js
Expand Down Expand Up @@ -115,7 +124,7 @@ const embedding = await embed({
});
```

### Anthropic Claude 3 on Vertex AI Model Garden
#### Anthropic Claude 3 on Vertex AI Model Garden

If you have access to Claude 3 models ([haiku](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-haiku), [sonnet](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-sonnet) or [opus](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-opus)) in Vertex AI Model Garden you can use them with Genkit.

Expand Down Expand Up @@ -147,3 +156,36 @@ const llmResponse = await generate({
prompt: 'What should I do when I visit Melbourne?',
});
```

### Evaluators

To use the evaluators from Vertex AI Rapid Evaluation, add an `evaluation` block to your `vertexAI` plugin configuration.

```js
import { vertexAI, VertexAIEvaluationMetricType } from '@genkit-ai/vertexai';

export default configureGenkit({
plugins: [
vertexAI({
projectId: 'your-cloud-project',
location: 'us-central1',
evaluation: {
metrics: [
VertexAIEvaluationMetricType.SAFETY,
{
type: VertexAIEvaluationMetricType.ROUGE,
metricSpec: {
rougeType: 'rougeLsum',
},
},
],
},
}),
],
// ...
});
```

The configuration above adds evaluators for the `Safety` and `ROUGE` metrics. The example shows two approaches- the `Safety` metric uses the default specification, whereas the `ROUGE` metric provides a customized specification that sets the rouge type to `rougeLsum`.

Both evaluators can be run using the `genkit eval:run` command with a compatible dataset: that is, a dataset with `output` and `reference` fields. The `Safety` evaluator can also be run using the `genkit eval:flow -e vertexai/safety` command since it only requires an `output`.
1 change: 1 addition & 0 deletions js/plugins/vertexai/src/evaluation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { EvaluatorFactory } from './evaluator_factory';
* https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/evaluation#parameter-list
*/
export enum VertexAIEvaluationMetricType {
// Update genkit/docs/plugins/vertex-ai.md when modifying the list of enums
SAFETY = 'SAFETY',
GROUNDEDNESS = 'GROUNDEDNESS',
BLEU = 'BLEU',
Expand Down