Skip to content

Commit f2b9429

Browse files
authored
Merge pull request #388 from julep-ai/release-please--branches--main--changes--next
release: 2.17.0
2 parents 39ba256 + 58bd338 commit f2b9429

File tree

10 files changed

+74
-8
lines changed

10 files changed

+74
-8
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "2.16.0"
2+
".": "2.17.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 66
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/julep-ai-inc-dash%2Fjulep-e680900fd043aaac74aae41a85e422007adc2a5d773754ab36ea6a36306137ee.yml
3-
openapi_spec_hash: bc28b176a6114f06893f7ec64f1a9a96
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/julep-ai-inc-dash%2Fjulep-a880d19544e9e8cb9696d136ac21b153779b2414d7ded94667e76471e9638975.yml
3+
openapi_spec_hash: e5b55ca102c1f937dad002a0000ee536
44
config_hash: 5cb77b8389154096b85883a93680f511

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 2.17.0 (2025-07-04)
4+
5+
Full Changelog: [v2.16.0...v2.17.0](https://github.com/julep-ai/python-sdk/compare/v2.16.0...v2.17.0)
6+
7+
### Features
8+
9+
* **api:** api update ([780911b](https://github.com/julep-ai/python-sdk/commit/780911b8a732e231e278c822bccb601f2463b0ff))
10+
311
## 2.16.0 (2025-07-02)
412

513
Full Changelog: [v2.15.2...v2.16.0](https://github.com/julep-ai/python-sdk/compare/v2.15.2...v2.16.0)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "julep"
3-
version = "2.16.0"
3+
version = "2.17.0"
44
description = "The official Python library for the julep API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/julep/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "julep"
4-
__version__ = "2.16.0" # x-release-please-version
4+
__version__ = "2.17.0" # x-release-please-version

src/julep/resources/sessions.py

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ def chat(
264264
messages: Iterable[session_chat_params.Message],
265265
connection_pool: object | NotGiven = NOT_GIVEN,
266266
agent: Optional[str] | NotGiven = NOT_GIVEN,
267+
auto_run_tools: bool | NotGiven = NOT_GIVEN,
267268
frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN,
268269
length_penalty: Optional[float] | NotGiven = NOT_GIVEN,
269270
logit_bias: Optional[Dict[str, float]] | NotGiven = NOT_GIVEN,
@@ -273,6 +274,7 @@ def chat(
273274
model: Optional[str] | NotGiven = NOT_GIVEN,
274275
presence_penalty: Optional[float] | NotGiven = NOT_GIVEN,
275276
recall: bool | NotGiven = NOT_GIVEN,
277+
recall_tools: bool | NotGiven = NOT_GIVEN,
276278
repetition_penalty: Optional[float] | NotGiven = NOT_GIVEN,
277279
response_format: Optional[session_chat_params.ResponseFormat] | NotGiven = NOT_GIVEN,
278280
save: bool | NotGiven = NOT_GIVEN,
@@ -294,11 +296,18 @@ def chat(
294296
"""
295297
Initiates a chat session.
296298
299+
Routes to different implementations based on feature flags:
300+
301+
- If auto_run_tools_chat feature flag is enabled, uses the new auto-tools
302+
implementation
303+
- Otherwise, uses the legacy implementation
304+
297305
Parameters: developer (Developer): The developer associated with the chat
298306
session. session_id (UUID): The unique identifier of the chat session.
299307
chat_input (ChatInput): The chat input data. background_tasks (BackgroundTasks):
300308
The background tasks to run. x_custom_api_key (Optional[str]): The custom API
301-
key.
309+
key. mock_response (Optional[str]): Mock response for testing. connection_pool:
310+
Connection pool for testing purposes.
302311
303312
Returns: ChatResponse or StreamingResponse: The chat response or streaming
304313
response.
@@ -367,6 +376,7 @@ def chat(
367376
{
368377
"messages": messages,
369378
"agent": agent,
379+
"auto_run_tools": auto_run_tools,
370380
"frequency_penalty": frequency_penalty,
371381
"length_penalty": length_penalty,
372382
"logit_bias": logit_bias,
@@ -376,6 +386,7 @@ def chat(
376386
"model": model,
377387
"presence_penalty": presence_penalty,
378388
"recall": recall,
389+
"recall_tools": recall_tools,
379390
"repetition_penalty": repetition_penalty,
380391
"response_format": response_format,
381392
"save": save,
@@ -538,6 +549,7 @@ def render(
538549
*,
539550
messages: Iterable[session_render_params.Message],
540551
agent: Optional[str] | NotGiven = NOT_GIVEN,
552+
auto_run_tools: bool | NotGiven = NOT_GIVEN,
541553
frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN,
542554
length_penalty: Optional[float] | NotGiven = NOT_GIVEN,
543555
logit_bias: Optional[Dict[str, float]] | NotGiven = NOT_GIVEN,
@@ -547,6 +559,7 @@ def render(
547559
model: Optional[str] | NotGiven = NOT_GIVEN,
548560
presence_penalty: Optional[float] | NotGiven = NOT_GIVEN,
549561
recall: bool | NotGiven = NOT_GIVEN,
562+
recall_tools: bool | NotGiven = NOT_GIVEN,
550563
repetition_penalty: Optional[float] | NotGiven = NOT_GIVEN,
551564
response_format: Optional[session_render_params.ResponseFormat] | NotGiven = NOT_GIVEN,
552565
save: bool | NotGiven = NOT_GIVEN,
@@ -567,6 +580,12 @@ def render(
567580
"""
568581
Renders a chat input.
569582
583+
Routes to different implementations based on feature flags:
584+
585+
- If auto_run_tools_chat feature flag is enabled, uses the new auto-tools
586+
implementation
587+
- Otherwise, uses the legacy implementation
588+
570589
Parameters: developer (Developer): The developer associated with the chat
571590
session. session_id (UUID): The unique identifier of the chat session.
572591
chat_input (ChatInput): The chat input data.
@@ -590,6 +609,7 @@ def render(
590609
{
591610
"messages": messages,
592611
"agent": agent,
612+
"auto_run_tools": auto_run_tools,
593613
"frequency_penalty": frequency_penalty,
594614
"length_penalty": length_penalty,
595615
"logit_bias": logit_bias,
@@ -599,6 +619,7 @@ def render(
599619
"model": model,
600620
"presence_penalty": presence_penalty,
601621
"recall": recall,
622+
"recall_tools": recall_tools,
602623
"repetition_penalty": repetition_penalty,
603624
"response_format": response_format,
604625
"save": save,
@@ -901,6 +922,7 @@ async def chat(
901922
messages: Iterable[session_chat_params.Message],
902923
connection_pool: object | NotGiven = NOT_GIVEN,
903924
agent: Optional[str] | NotGiven = NOT_GIVEN,
925+
auto_run_tools: bool | NotGiven = NOT_GIVEN,
904926
frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN,
905927
length_penalty: Optional[float] | NotGiven = NOT_GIVEN,
906928
logit_bias: Optional[Dict[str, float]] | NotGiven = NOT_GIVEN,
@@ -910,6 +932,7 @@ async def chat(
910932
model: Optional[str] | NotGiven = NOT_GIVEN,
911933
presence_penalty: Optional[float] | NotGiven = NOT_GIVEN,
912934
recall: bool | NotGiven = NOT_GIVEN,
935+
recall_tools: bool | NotGiven = NOT_GIVEN,
913936
repetition_penalty: Optional[float] | NotGiven = NOT_GIVEN,
914937
response_format: Optional[session_chat_params.ResponseFormat] | NotGiven = NOT_GIVEN,
915938
save: bool | NotGiven = NOT_GIVEN,
@@ -931,11 +954,18 @@ async def chat(
931954
"""
932955
Initiates a chat session.
933956
957+
Routes to different implementations based on feature flags:
958+
959+
- If auto_run_tools_chat feature flag is enabled, uses the new auto-tools
960+
implementation
961+
- Otherwise, uses the legacy implementation
962+
934963
Parameters: developer (Developer): The developer associated with the chat
935964
session. session_id (UUID): The unique identifier of the chat session.
936965
chat_input (ChatInput): The chat input data. background_tasks (BackgroundTasks):
937966
The background tasks to run. x_custom_api_key (Optional[str]): The custom API
938-
key.
967+
key. mock_response (Optional[str]): Mock response for testing. connection_pool:
968+
Connection pool for testing purposes.
939969
940970
Returns: ChatResponse or StreamingResponse: The chat response or streaming
941971
response.
@@ -1008,6 +1038,7 @@ async def chat(
10081038
{
10091039
"messages": messages,
10101040
"agent": agent,
1041+
"auto_run_tools": auto_run_tools,
10111042
"frequency_penalty": frequency_penalty,
10121043
"length_penalty": length_penalty,
10131044
"logit_bias": logit_bias,
@@ -1017,6 +1048,7 @@ async def chat(
10171048
"model": model,
10181049
"presence_penalty": presence_penalty,
10191050
"recall": recall,
1051+
"recall_tools": recall_tools,
10201052
"repetition_penalty": repetition_penalty,
10211053
"response_format": response_format,
10221054
"save": save,
@@ -1181,6 +1213,7 @@ async def render(
11811213
*,
11821214
messages: Iterable[session_render_params.Message],
11831215
agent: Optional[str] | NotGiven = NOT_GIVEN,
1216+
auto_run_tools: bool | NotGiven = NOT_GIVEN,
11841217
frequency_penalty: Optional[float] | NotGiven = NOT_GIVEN,
11851218
length_penalty: Optional[float] | NotGiven = NOT_GIVEN,
11861219
logit_bias: Optional[Dict[str, float]] | NotGiven = NOT_GIVEN,
@@ -1190,6 +1223,7 @@ async def render(
11901223
model: Optional[str] | NotGiven = NOT_GIVEN,
11911224
presence_penalty: Optional[float] | NotGiven = NOT_GIVEN,
11921225
recall: bool | NotGiven = NOT_GIVEN,
1226+
recall_tools: bool | NotGiven = NOT_GIVEN,
11931227
repetition_penalty: Optional[float] | NotGiven = NOT_GIVEN,
11941228
response_format: Optional[session_render_params.ResponseFormat] | NotGiven = NOT_GIVEN,
11951229
save: bool | NotGiven = NOT_GIVEN,
@@ -1210,6 +1244,12 @@ async def render(
12101244
"""
12111245
Renders a chat input.
12121246
1247+
Routes to different implementations based on feature flags:
1248+
1249+
- If auto_run_tools_chat feature flag is enabled, uses the new auto-tools
1250+
implementation
1251+
- Otherwise, uses the legacy implementation
1252+
12131253
Parameters: developer (Developer): The developer associated with the chat
12141254
session. session_id (UUID): The unique identifier of the chat session.
12151255
chat_input (ChatInput): The chat input data.
@@ -1233,6 +1273,7 @@ async def render(
12331273
{
12341274
"messages": messages,
12351275
"agent": agent,
1276+
"auto_run_tools": auto_run_tools,
12361277
"frequency_penalty": frequency_penalty,
12371278
"length_penalty": length_penalty,
12381279
"logit_bias": logit_bias,
@@ -1242,6 +1283,7 @@ async def render(
12421283
"model": model,
12431284
"presence_penalty": presence_penalty,
12441285
"recall": recall,
1286+
"recall_tools": recall_tools,
12451287
"repetition_penalty": repetition_penalty,
12461288
"response_format": response_format,
12471289
"save": save,

src/julep/types/entry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ class Entry(BaseModel):
467467

468468
role: Literal["user", "assistant", "system", "tool"]
469469

470-
source: Literal["api_request", "api_response", "tool_response", "internal", "summarizer", "meta"]
470+
source: Literal["api_request", "api_response", "tool_request", "tool_response", "internal", "summarizer", "meta"]
471471

472472
timestamp: datetime
473473

src/julep/types/session_chat_params.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ class SessionChatParams(TypedDict, total=False):
7171

7272
agent: Optional[str]
7373

74+
auto_run_tools: bool
75+
7476
frequency_penalty: Optional[float]
7577

7678
length_penalty: Optional[float]
@@ -89,6 +91,8 @@ class SessionChatParams(TypedDict, total=False):
8991

9092
recall: bool
9193

94+
recall_tools: bool
95+
9296
repetition_penalty: Optional[float]
9397

9498
response_format: Optional[ResponseFormat]

src/julep/types/session_render_params.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ class SessionRenderParams(TypedDict, total=False):
6969

7070
agent: Optional[str]
7171

72+
auto_run_tools: bool
73+
7274
frequency_penalty: Optional[float]
7375

7476
length_penalty: Optional[float]
@@ -87,6 +89,8 @@ class SessionRenderParams(TypedDict, total=False):
8789

8890
recall: bool
8991

92+
recall_tools: bool
93+
9094
repetition_penalty: Optional[float]
9195

9296
response_format: Optional[ResponseFormat]

tests/api_resources/test_sessions.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ def test_method_chat_with_all_params(self, client: Julep) -> None:
269269
],
270270
connection_pool={},
271271
agent="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
272+
auto_run_tools=True,
272273
frequency_penalty=-2,
273274
length_penalty=0,
274275
logit_bias={"foo": -100},
@@ -278,6 +279,7 @@ def test_method_chat_with_all_params(self, client: Julep) -> None:
278279
model="recNPna{}ip}t",
279280
presence_penalty=-2,
280281
recall=True,
282+
recall_tools=True,
281283
repetition_penalty=0,
282284
response_format={"type": "text"},
283285
save=True,
@@ -590,6 +592,7 @@ def test_method_render_with_all_params(self, client: Julep) -> None:
590592
}
591593
],
592594
agent="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
595+
auto_run_tools=True,
593596
frequency_penalty=-2,
594597
length_penalty=0,
595598
logit_bias={"foo": -100},
@@ -599,6 +602,7 @@ def test_method_render_with_all_params(self, client: Julep) -> None:
599602
model="recNPna{}ip}t",
600603
presence_penalty=-2,
601604
recall=True,
605+
recall_tools=True,
602606
repetition_penalty=0,
603607
response_format={"type": "text"},
604608
save=True,
@@ -1029,6 +1033,7 @@ async def test_method_chat_with_all_params(self, async_client: AsyncJulep) -> No
10291033
],
10301034
connection_pool={},
10311035
agent="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
1036+
auto_run_tools=True,
10321037
frequency_penalty=-2,
10331038
length_penalty=0,
10341039
logit_bias={"foo": -100},
@@ -1038,6 +1043,7 @@ async def test_method_chat_with_all_params(self, async_client: AsyncJulep) -> No
10381043
model="recNPna{}ip}t",
10391044
presence_penalty=-2,
10401045
recall=True,
1046+
recall_tools=True,
10411047
repetition_penalty=0,
10421048
response_format={"type": "text"},
10431049
save=True,
@@ -1350,6 +1356,7 @@ async def test_method_render_with_all_params(self, async_client: AsyncJulep) ->
13501356
}
13511357
],
13521358
agent="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
1359+
auto_run_tools=True,
13531360
frequency_penalty=-2,
13541361
length_penalty=0,
13551362
logit_bias={"foo": -100},
@@ -1359,6 +1366,7 @@ async def test_method_render_with_all_params(self, async_client: AsyncJulep) ->
13591366
model="recNPna{}ip}t",
13601367
presence_penalty=-2,
13611368
recall=True,
1369+
recall_tools=True,
13621370
repetition_penalty=0,
13631371
response_format={"type": "text"},
13641372
save=True,

0 commit comments

Comments
 (0)