Skip to content

Commit 519ce28

Browse files
author
stlc-bot
committed
feat(people): add ultra mode to people search (#2149)
Stainless-Generated-From: 67275ca8930bf6537d4e079436adb185b057e7c7
1 parent e1d8415 commit 519ce28

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

‎pkg/cmd/person.go‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,20 +152,26 @@ var peopleSearch = requestflag.WithInnerFlags(cli.Command{
152152
Flags: []cli.Flag{
153153
&requestflag.Flag[string]{
154154
Name: "query",
155-
Usage: "Describe the people to find.",
155+
Usage: "Describe the people to find. Up to 500 characters in `fast` mode and 5000 in `ultra` mode.",
156156
Required: true,
157157
BodyPath: "query",
158158
},
159159
&requestflag.Flag[string]{
160160
Name: "cursor",
161-
Usage: "Use next_cursor with the same query and filters to fetch the next page.",
161+
Usage: "Use next_cursor with the same query, mode and filters to fetch the next page.",
162162
BodyPath: "cursor",
163163
},
164164
&requestflag.Flag[map[string]any]{
165165
Name: "filters",
166166
Usage: "Additional constraints every result must match.",
167167
BodyPath: "filters",
168168
},
169+
&requestflag.Flag[string]{
170+
Name: "mode",
171+
Usage: "`fast` matches people on basic criteria (e.g. their role, location or background); `ultra` plans a deeper search, judges each candidate against every criterion in the query and explains each match.",
172+
Default: "fast",
173+
BodyPath: "mode",
174+
},
169175
&requestflag.Flag[[]string]{
170176
Name: "tag",
171177
Usage: "Labels for filtering usage in the dashboard.",

‎pkg/cmd/person_test.go‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ func TestPeopleSearch(t *testing.T) {
107107
"--query", "VPs of sales at solar companies in California",
108108
"--cursor", "cursor",
109109
"--filters", "{countries: [SE], years_of_experience_max: 0, years_of_experience_min: 0}",
110+
"--mode", "fast",
110111
"--tag", "production",
111112
"--tag", "team-alpha",
112113
)
@@ -126,6 +127,7 @@ func TestPeopleSearch(t *testing.T) {
126127
"--filters.countries", "[SE]",
127128
"--filters.years-of-experience-max", "0",
128129
"--filters.years-of-experience-min", "0",
130+
"--mode", "fast",
129131
"--tag", "production",
130132
"--tag", "team-alpha",
131133
)
@@ -141,6 +143,7 @@ func TestPeopleSearch(t *testing.T) {
141143
" - SE\n" +
142144
" years_of_experience_max: 0\n" +
143145
" years_of_experience_min: 0\n" +
146+
"mode: fast\n" +
144147
"tags:\n" +
145148
" - production\n" +
146149
" - team-alpha\n")

0 commit comments

Comments
 (0)