Skip to content

Commit 0624ad4

Browse files
feat(api): api update (#323)
1 parent b64471d commit 0624ad4

16 files changed

+33056
-809
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 52
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/julep-ai-inc-dash%2Fjulep-5f675224303f099e5c8989cf126ff8c85ee1e03397cbee73cac016c4d0795e86.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/julep-ai-inc-dash%2Fjulep-4d9d1f8b357a593ea53060e994b0e816f251a68e0325f1548e502d4ab2cfdaa6.yml

src/julep/resources/agents/docs.py

+12-14
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,9 @@ def search(
197197
*,
198198
text: str,
199199
connection_pool: object | NotGiven = NOT_GIVEN,
200-
lang: Literal["en-US"] | NotGiven = NOT_GIVEN,
200+
lang: str | NotGiven = NOT_GIVEN,
201201
limit: int | NotGiven = NOT_GIVEN,
202202
metadata_filter: object | NotGiven = NOT_GIVEN,
203-
mmr_strength: float | NotGiven = NOT_GIVEN,
204203
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
205204
# The extra values given here take precedence over values defined on the client or passed to this method.
206205
extra_headers: Headers | None = None,
@@ -238,7 +237,7 @@ def search(
238237
vector: Iterable[float],
239238
connection_pool: object | NotGiven = NOT_GIVEN,
240239
confidence: float | NotGiven = NOT_GIVEN,
241-
lang: Literal["en-US"] | NotGiven = NOT_GIVEN,
240+
lang: str | NotGiven = NOT_GIVEN,
242241
limit: int | NotGiven = NOT_GIVEN,
243242
metadata_filter: object | NotGiven = NOT_GIVEN,
244243
mmr_strength: float | NotGiven = NOT_GIVEN,
@@ -281,7 +280,7 @@ def search(
281280
connection_pool: object | NotGiven = NOT_GIVEN,
282281
alpha: float | NotGiven = NOT_GIVEN,
283282
confidence: float | NotGiven = NOT_GIVEN,
284-
lang: Literal["en-US"] | NotGiven = NOT_GIVEN,
283+
lang: str | NotGiven = NOT_GIVEN,
285284
limit: int | NotGiven = NOT_GIVEN,
286285
metadata_filter: object | NotGiven = NOT_GIVEN,
287286
mmr_strength: float | NotGiven = NOT_GIVEN,
@@ -321,12 +320,12 @@ def search(
321320
*,
322321
text: str | NotGiven = NOT_GIVEN,
323322
connection_pool: object | NotGiven = NOT_GIVEN,
324-
lang: Literal["en-US"] | NotGiven = NOT_GIVEN,
323+
lang: str | NotGiven = NOT_GIVEN,
325324
limit: int | NotGiven = NOT_GIVEN,
326325
metadata_filter: object | NotGiven = NOT_GIVEN,
327-
mmr_strength: float | NotGiven = NOT_GIVEN,
328326
vector: Iterable[float] | NotGiven = NOT_GIVEN,
329327
confidence: float | NotGiven = NOT_GIVEN,
328+
mmr_strength: float | NotGiven = NOT_GIVEN,
330329
alpha: float | NotGiven = NOT_GIVEN,
331330
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
332331
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -345,9 +344,9 @@ def search(
345344
"lang": lang,
346345
"limit": limit,
347346
"metadata_filter": metadata_filter,
348-
"mmr_strength": mmr_strength,
349347
"vector": vector,
350348
"confidence": confidence,
349+
"mmr_strength": mmr_strength,
351350
"alpha": alpha,
352351
},
353352
doc_search_params.DocSearchParams,
@@ -531,10 +530,9 @@ async def search(
531530
*,
532531
text: str,
533532
connection_pool: object | NotGiven = NOT_GIVEN,
534-
lang: Literal["en-US"] | NotGiven = NOT_GIVEN,
533+
lang: str | NotGiven = NOT_GIVEN,
535534
limit: int | NotGiven = NOT_GIVEN,
536535
metadata_filter: object | NotGiven = NOT_GIVEN,
537-
mmr_strength: float | NotGiven = NOT_GIVEN,
538536
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
539537
# The extra values given here take precedence over values defined on the client or passed to this method.
540538
extra_headers: Headers | None = None,
@@ -572,7 +570,7 @@ async def search(
572570
vector: Iterable[float],
573571
connection_pool: object | NotGiven = NOT_GIVEN,
574572
confidence: float | NotGiven = NOT_GIVEN,
575-
lang: Literal["en-US"] | NotGiven = NOT_GIVEN,
573+
lang: str | NotGiven = NOT_GIVEN,
576574
limit: int | NotGiven = NOT_GIVEN,
577575
metadata_filter: object | NotGiven = NOT_GIVEN,
578576
mmr_strength: float | NotGiven = NOT_GIVEN,
@@ -615,7 +613,7 @@ async def search(
615613
connection_pool: object | NotGiven = NOT_GIVEN,
616614
alpha: float | NotGiven = NOT_GIVEN,
617615
confidence: float | NotGiven = NOT_GIVEN,
618-
lang: Literal["en-US"] | NotGiven = NOT_GIVEN,
616+
lang: str | NotGiven = NOT_GIVEN,
619617
limit: int | NotGiven = NOT_GIVEN,
620618
metadata_filter: object | NotGiven = NOT_GIVEN,
621619
mmr_strength: float | NotGiven = NOT_GIVEN,
@@ -655,12 +653,12 @@ async def search(
655653
*,
656654
text: str | NotGiven = NOT_GIVEN,
657655
connection_pool: object | NotGiven = NOT_GIVEN,
658-
lang: Literal["en-US"] | NotGiven = NOT_GIVEN,
656+
lang: str | NotGiven = NOT_GIVEN,
659657
limit: int | NotGiven = NOT_GIVEN,
660658
metadata_filter: object | NotGiven = NOT_GIVEN,
661-
mmr_strength: float | NotGiven = NOT_GIVEN,
662659
vector: Iterable[float] | NotGiven = NOT_GIVEN,
663660
confidence: float | NotGiven = NOT_GIVEN,
661+
mmr_strength: float | NotGiven = NOT_GIVEN,
664662
alpha: float | NotGiven = NOT_GIVEN,
665663
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
666664
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -679,9 +677,9 @@ async def search(
679677
"lang": lang,
680678
"limit": limit,
681679
"metadata_filter": metadata_filter,
682-
"mmr_strength": mmr_strength,
683680
"vector": vector,
684681
"confidence": confidence,
682+
"mmr_strength": mmr_strength,
685683
"alpha": alpha,
686684
},
687685
doc_search_params.DocSearchParams,

src/julep/resources/users/docs.py

+12-14
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,9 @@ def search(
204204
*,
205205
text: str,
206206
connection_pool: object | NotGiven = NOT_GIVEN,
207-
lang: Literal["en-US"] | NotGiven = NOT_GIVEN,
207+
lang: str | NotGiven = NOT_GIVEN,
208208
limit: int | NotGiven = NOT_GIVEN,
209209
metadata_filter: object | NotGiven = NOT_GIVEN,
210-
mmr_strength: float | NotGiven = NOT_GIVEN,
211210
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
212211
# The extra values given here take precedence over values defined on the client or passed to this method.
213212
extra_headers: Headers | None = None,
@@ -244,7 +243,7 @@ def search(
244243
vector: Iterable[float],
245244
connection_pool: object | NotGiven = NOT_GIVEN,
246245
confidence: float | NotGiven = NOT_GIVEN,
247-
lang: Literal["en-US"] | NotGiven = NOT_GIVEN,
246+
lang: str | NotGiven = NOT_GIVEN,
248247
limit: int | NotGiven = NOT_GIVEN,
249248
metadata_filter: object | NotGiven = NOT_GIVEN,
250249
mmr_strength: float | NotGiven = NOT_GIVEN,
@@ -286,7 +285,7 @@ def search(
286285
connection_pool: object | NotGiven = NOT_GIVEN,
287286
alpha: float | NotGiven = NOT_GIVEN,
288287
confidence: float | NotGiven = NOT_GIVEN,
289-
lang: Literal["en-US"] | NotGiven = NOT_GIVEN,
288+
lang: str | NotGiven = NOT_GIVEN,
290289
limit: int | NotGiven = NOT_GIVEN,
291290
metadata_filter: object | NotGiven = NOT_GIVEN,
292291
mmr_strength: float | NotGiven = NOT_GIVEN,
@@ -325,12 +324,12 @@ def search(
325324
*,
326325
text: str | NotGiven = NOT_GIVEN,
327326
connection_pool: object | NotGiven = NOT_GIVEN,
328-
lang: Literal["en-US"] | NotGiven = NOT_GIVEN,
327+
lang: str | NotGiven = NOT_GIVEN,
329328
limit: int | NotGiven = NOT_GIVEN,
330329
metadata_filter: object | NotGiven = NOT_GIVEN,
331-
mmr_strength: float | NotGiven = NOT_GIVEN,
332330
vector: Iterable[float] | NotGiven = NOT_GIVEN,
333331
confidence: float | NotGiven = NOT_GIVEN,
332+
mmr_strength: float | NotGiven = NOT_GIVEN,
334333
alpha: float | NotGiven = NOT_GIVEN,
335334
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
336335
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -349,9 +348,9 @@ def search(
349348
"lang": lang,
350349
"limit": limit,
351350
"metadata_filter": metadata_filter,
352-
"mmr_strength": mmr_strength,
353351
"vector": vector,
354352
"confidence": confidence,
353+
"mmr_strength": mmr_strength,
355354
"alpha": alpha,
356355
},
357356
doc_search_params.DocSearchParams,
@@ -542,10 +541,9 @@ async def search(
542541
*,
543542
text: str,
544543
connection_pool: object | NotGiven = NOT_GIVEN,
545-
lang: Literal["en-US"] | NotGiven = NOT_GIVEN,
544+
lang: str | NotGiven = NOT_GIVEN,
546545
limit: int | NotGiven = NOT_GIVEN,
547546
metadata_filter: object | NotGiven = NOT_GIVEN,
548-
mmr_strength: float | NotGiven = NOT_GIVEN,
549547
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
550548
# The extra values given here take precedence over values defined on the client or passed to this method.
551549
extra_headers: Headers | None = None,
@@ -582,7 +580,7 @@ async def search(
582580
vector: Iterable[float],
583581
connection_pool: object | NotGiven = NOT_GIVEN,
584582
confidence: float | NotGiven = NOT_GIVEN,
585-
lang: Literal["en-US"] | NotGiven = NOT_GIVEN,
583+
lang: str | NotGiven = NOT_GIVEN,
586584
limit: int | NotGiven = NOT_GIVEN,
587585
metadata_filter: object | NotGiven = NOT_GIVEN,
588586
mmr_strength: float | NotGiven = NOT_GIVEN,
@@ -624,7 +622,7 @@ async def search(
624622
connection_pool: object | NotGiven = NOT_GIVEN,
625623
alpha: float | NotGiven = NOT_GIVEN,
626624
confidence: float | NotGiven = NOT_GIVEN,
627-
lang: Literal["en-US"] | NotGiven = NOT_GIVEN,
625+
lang: str | NotGiven = NOT_GIVEN,
628626
limit: int | NotGiven = NOT_GIVEN,
629627
metadata_filter: object | NotGiven = NOT_GIVEN,
630628
mmr_strength: float | NotGiven = NOT_GIVEN,
@@ -663,12 +661,12 @@ async def search(
663661
*,
664662
text: str | NotGiven = NOT_GIVEN,
665663
connection_pool: object | NotGiven = NOT_GIVEN,
666-
lang: Literal["en-US"] | NotGiven = NOT_GIVEN,
664+
lang: str | NotGiven = NOT_GIVEN,
667665
limit: int | NotGiven = NOT_GIVEN,
668666
metadata_filter: object | NotGiven = NOT_GIVEN,
669-
mmr_strength: float | NotGiven = NOT_GIVEN,
670667
vector: Iterable[float] | NotGiven = NOT_GIVEN,
671668
confidence: float | NotGiven = NOT_GIVEN,
669+
mmr_strength: float | NotGiven = NOT_GIVEN,
672670
alpha: float | NotGiven = NOT_GIVEN,
673671
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
674672
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -687,9 +685,9 @@ async def search(
687685
"lang": lang,
688686
"limit": limit,
689687
"metadata_filter": metadata_filter,
690-
"mmr_strength": mmr_strength,
691688
"vector": vector,
692689
"confidence": confidence,
690+
"mmr_strength": mmr_strength,
693691
"alpha": alpha,
694692
},
695693
doc_search_params.DocSearchParams,

src/julep/types/agents/doc_search_params.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from __future__ import annotations
44

55
from typing import Union, Iterable
6-
from typing_extensions import Literal, Required, TypeAlias, TypedDict
6+
from typing_extensions import Required, TypeAlias, TypedDict
77

88
__all__ = ["DocSearchParams", "TextOnlyDocSearchRequest", "VectorDocSearchRequest", "HybridDocSearchRequest"]
99

@@ -13,14 +13,12 @@ class TextOnlyDocSearchRequest(TypedDict, total=False):
1313

1414
connection_pool: object
1515

16-
lang: Literal["en-US"]
16+
lang: str
1717

1818
limit: int
1919

2020
metadata_filter: object
2121

22-
mmr_strength: float
23-
2422

2523
class VectorDocSearchRequest(TypedDict, total=False):
2624
vector: Required[Iterable[float]]
@@ -29,7 +27,7 @@ class VectorDocSearchRequest(TypedDict, total=False):
2927

3028
confidence: float
3129

32-
lang: Literal["en-US"]
30+
lang: str
3331

3432
limit: int
3533

@@ -49,7 +47,7 @@ class HybridDocSearchRequest(TypedDict, total=False):
4947

5048
confidence: float
5149

52-
lang: Literal["en-US"]
50+
lang: str
5351

5452
limit: int
5553

src/julep/types/session.py

+49-6
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,58 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import Optional
3+
from typing import Union, Optional
44
from datetime import datetime
5-
from typing_extensions import Literal
5+
from typing_extensions import Literal, TypeAlias
66

77
from .._models import BaseModel
88

9-
__all__ = ["Session", "RecallOptions"]
9+
__all__ = [
10+
"Session",
11+
"RecallOptions",
12+
"RecallOptionsVectorDocSearch",
13+
"RecallOptionsTextOnlyDocSearch",
14+
"RecallOptionsHybridDocSearch",
15+
]
1016

1117

12-
class RecallOptions(BaseModel):
18+
class RecallOptionsVectorDocSearch(BaseModel):
19+
confidence: Optional[float] = None
20+
21+
lang: Optional[str] = None
22+
23+
limit: Optional[int] = None
24+
25+
max_query_length: Optional[int] = None
26+
27+
metadata_filter: Optional[object] = None
28+
29+
mmr_strength: Optional[float] = None
30+
31+
mode: Optional[str] = None
32+
33+
num_search_messages: Optional[int] = None
34+
35+
36+
class RecallOptionsTextOnlyDocSearch(BaseModel):
37+
lang: Optional[str] = None
38+
39+
limit: Optional[int] = None
40+
41+
max_query_length: Optional[int] = None
42+
43+
metadata_filter: Optional[object] = None
44+
45+
mode: Optional[str] = None
46+
47+
num_search_messages: Optional[int] = None
48+
49+
50+
class RecallOptionsHybridDocSearch(BaseModel):
1351
alpha: Optional[float] = None
1452

1553
confidence: Optional[float] = None
1654

17-
lang: Optional[Literal["en-US"]] = None
55+
lang: Optional[str] = None
1856

1957
limit: Optional[int] = None
2058

@@ -24,11 +62,16 @@ class RecallOptions(BaseModel):
2462

2563
mmr_strength: Optional[float] = None
2664

27-
mode: Optional[Literal["hybrid", "vector", "text"]] = None
65+
mode: Optional[str] = None
2866

2967
num_search_messages: Optional[int] = None
3068

3169

70+
RecallOptions: TypeAlias = Union[
71+
RecallOptionsVectorDocSearch, RecallOptionsTextOnlyDocSearch, RecallOptionsHybridDocSearch, None
72+
]
73+
74+
3275
class Session(BaseModel):
3376
id: str
3477

0 commit comments

Comments
 (0)