Skip to content

Commit 0bfd8c4

Browse files
RobertCraigiestainless-app[bot]
authored andcommitted
fix(assistants): correctly send include query param
1 parent af791d5 commit 0bfd8c4

File tree

1 file changed

+10
-5
lines changed
  • src/openai/resources/beta/threads/runs

1 file changed

+10
-5
lines changed

src/openai/resources/beta/threads/runs/runs.py

+10-5
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,6 @@ def stream(
11061106
body=maybe_transform(
11071107
{
11081108
"assistant_id": assistant_id,
1109-
"include": include,
11101109
"additional_instructions": additional_instructions,
11111110
"additional_messages": additional_messages,
11121111
"instructions": instructions,
@@ -1126,7 +1125,11 @@ def stream(
11261125
run_create_params.RunCreateParams,
11271126
),
11281127
options=make_request_options(
1129-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1128+
extra_headers=extra_headers,
1129+
extra_query=extra_query,
1130+
extra_body=extra_body,
1131+
timeout=timeout,
1132+
query=maybe_transform({"include": include}, run_create_params.RunCreateParams),
11301133
),
11311134
cast_to=Run,
11321135
stream=True,
@@ -1899,7 +1902,6 @@ async def create(
18991902
body=await async_maybe_transform(
19001903
{
19011904
"assistant_id": assistant_id,
1902-
"include": include,
19031905
"additional_instructions": additional_instructions,
19041906
"additional_messages": additional_messages,
19051907
"instructions": instructions,
@@ -2472,7 +2474,6 @@ def stream(
24722474
body=maybe_transform(
24732475
{
24742476
"assistant_id": assistant_id,
2475-
"include": include,
24762477
"additional_instructions": additional_instructions,
24772478
"additional_messages": additional_messages,
24782479
"instructions": instructions,
@@ -2492,7 +2493,11 @@ def stream(
24922493
run_create_params.RunCreateParams,
24932494
),
24942495
options=make_request_options(
2495-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
2496+
extra_headers=extra_headers,
2497+
extra_query=extra_query,
2498+
extra_body=extra_body,
2499+
timeout=timeout,
2500+
query=maybe_transform({"include": include}, run_create_params.RunCreateParams),
24962501
),
24972502
cast_to=Run,
24982503
stream=True,

0 commit comments

Comments
 (0)