openai/openai-python
Publicmirrored from https://github.com/openai/openai-pythonAvailable
tests/api_resources/beta/threads/test_runs.py
1351lines · modeblame
5cfb125aStainless Bot2 years ago | 1 | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. |
baa9f07fRobert Craigie2 years ago | 2 | |
| 3 | from __future__ import annotations | |
| 4 | | |
| 5 | import os | |
86379b44Stainless Bot2 years ago | 6 | from typing import Any, cast |
baa9f07fRobert Craigie2 years ago | 7 | |
| 8 | import pytest | |
| 9 | | |
| 10 | from openai import OpenAI, AsyncOpenAI | |
| 11 | from tests.utils import assert_matches_type | |
| 12 | from openai.pagination import SyncCursorPage, AsyncCursorPage | |
4a0f0fa0Stainless Bot2 years ago | 13 | from openai.types.beta.threads import ( |
| 14 | Run, | |
| 15 | ) | |
baa9f07fRobert Craigie2 years ago | 16 | |
595f3b36Stainless Bot2 years ago | 17 | # pyright: reportDeprecated=false |
| 18 | | |
baa9f07fRobert Craigie2 years ago | 19 | base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") |
| 20 | | |
| 21 | | |
| 22 | class TestRuns: | |
98d779fbStainless Bot2 years ago | 23 | parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) |
baa9f07fRobert Craigie2 years ago | 24 | |
| 25 | @parametrize | |
5429f696Stainless Bot2 years ago | 26 | def test_method_create_overload_1(self, client: OpenAI) -> None: |
baa9f07fRobert Craigie2 years ago | 27 | run = client.beta.threads.runs.create( |
| 28 | "string", | |
| 29 | assistant_id="string", | |
| 30 | ) | |
| 31 | assert_matches_type(Run, run, path=["response"]) | |
| 32 | | |
| 33 | @parametrize | |
5429f696Stainless Bot2 years ago | 34 | def test_method_create_with_all_params_overload_1(self, client: OpenAI) -> None: |
baa9f07fRobert Craigie2 years ago | 35 | run = client.beta.threads.runs.create( |
| 36 | "string", | |
| 37 | assistant_id="string", | |
53bca49eStainless Bot2 years ago | 38 | additional_instructions="string", |
e2d65bf7Stainless Bot2 years ago | 39 | additional_messages=[ |
| 40 | { | |
79a0b401Stainless Bot2 years ago | 41 | "content": "string", |
092a8df7Stainless Bot1 years ago | 42 | "role": "user", |
5b20698dStainless Bot2 years ago | 43 | "attachments": [ |
| 44 | { | |
| 45 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 46 | "tools": [ |
| 47 | {"type": "code_interpreter"}, | |
| 48 | {"type": "code_interpreter"}, | |
| 49 | {"type": "code_interpreter"}, | |
| 50 | ], | |
5b20698dStainless Bot2 years ago | 51 | }, |
| 52 | { | |
| 53 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 54 | "tools": [ |
| 55 | {"type": "code_interpreter"}, | |
| 56 | {"type": "code_interpreter"}, | |
| 57 | {"type": "code_interpreter"}, | |
| 58 | ], | |
5b20698dStainless Bot2 years ago | 59 | }, |
| 60 | { | |
| 61 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 62 | "tools": [ |
| 63 | {"type": "code_interpreter"}, | |
| 64 | {"type": "code_interpreter"}, | |
| 65 | {"type": "code_interpreter"}, | |
| 66 | ], | |
5b20698dStainless Bot2 years ago | 67 | }, |
| 68 | ], | |
e2d65bf7Stainless Bot2 years ago | 69 | "metadata": {}, |
| 70 | }, | |
| 71 | { | |
79a0b401Stainless Bot2 years ago | 72 | "content": "string", |
092a8df7Stainless Bot1 years ago | 73 | "role": "user", |
5b20698dStainless Bot2 years ago | 74 | "attachments": [ |
| 75 | { | |
| 76 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 77 | "tools": [ |
| 78 | {"type": "code_interpreter"}, | |
| 79 | {"type": "code_interpreter"}, | |
| 80 | {"type": "code_interpreter"}, | |
| 81 | ], | |
5b20698dStainless Bot2 years ago | 82 | }, |
| 83 | { | |
| 84 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 85 | "tools": [ |
| 86 | {"type": "code_interpreter"}, | |
| 87 | {"type": "code_interpreter"}, | |
| 88 | {"type": "code_interpreter"}, | |
| 89 | ], | |
5b20698dStainless Bot2 years ago | 90 | }, |
| 91 | { | |
| 92 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 93 | "tools": [ |
| 94 | {"type": "code_interpreter"}, | |
| 95 | {"type": "code_interpreter"}, | |
| 96 | {"type": "code_interpreter"}, | |
| 97 | ], | |
5b20698dStainless Bot2 years ago | 98 | }, |
| 99 | ], | |
e2d65bf7Stainless Bot2 years ago | 100 | "metadata": {}, |
| 101 | }, | |
| 102 | { | |
79a0b401Stainless Bot2 years ago | 103 | "content": "string", |
092a8df7Stainless Bot1 years ago | 104 | "role": "user", |
5b20698dStainless Bot2 years ago | 105 | "attachments": [ |
| 106 | { | |
| 107 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 108 | "tools": [ |
| 109 | {"type": "code_interpreter"}, | |
| 110 | {"type": "code_interpreter"}, | |
| 111 | {"type": "code_interpreter"}, | |
| 112 | ], | |
5b20698dStainless Bot2 years ago | 113 | }, |
| 114 | { | |
| 115 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 116 | "tools": [ |
| 117 | {"type": "code_interpreter"}, | |
| 118 | {"type": "code_interpreter"}, | |
| 119 | {"type": "code_interpreter"}, | |
| 120 | ], | |
5b20698dStainless Bot2 years ago | 121 | }, |
| 122 | { | |
| 123 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 124 | "tools": [ |
| 125 | {"type": "code_interpreter"}, | |
| 126 | {"type": "code_interpreter"}, | |
| 127 | {"type": "code_interpreter"}, | |
| 128 | ], | |
5b20698dStainless Bot2 years ago | 129 | }, |
| 130 | ], | |
e2d65bf7Stainless Bot2 years ago | 131 | "metadata": {}, |
| 132 | }, | |
| 133 | ], | |
baa9f07fRobert Craigie2 years ago | 134 | instructions="string", |
f5247e30Stainless Bot2 years ago | 135 | max_completion_tokens=256, |
| 136 | max_prompt_tokens=256, | |
baa9f07fRobert Craigie2 years ago | 137 | metadata={}, |
bf1ca86cRobert Craigie1 years ago | 138 | model="gpt-4o", |
7399ffc8Stainless Bot2 years ago | 139 | parallel_tool_calls=True, |
bf1ca86cRobert Craigie1 years ago | 140 | response_format="auto", |
5429f696Stainless Bot2 years ago | 141 | stream=False, |
27a4626aStainless Bot2 years ago | 142 | temperature=1, |
f5247e30Stainless Bot2 years ago | 143 | tool_choice="none", |
baa9f07fRobert Craigie2 years ago | 144 | tools=[{"type": "code_interpreter"}, {"type": "code_interpreter"}, {"type": "code_interpreter"}], |
5b20698dStainless Bot2 years ago | 145 | top_p=1, |
f5247e30Stainless Bot2 years ago | 146 | truncation_strategy={ |
| 147 | "type": "auto", | |
| 148 | "last_messages": 1, | |
| 149 | }, | |
baa9f07fRobert Craigie2 years ago | 150 | ) |
| 151 | assert_matches_type(Run, run, path=["response"]) | |
| 152 | | |
| 153 | @parametrize | |
5429f696Stainless Bot2 years ago | 154 | def test_raw_response_create_overload_1(self, client: OpenAI) -> None: |
baa9f07fRobert Craigie2 years ago | 155 | response = client.beta.threads.runs.with_raw_response.create( |
| 156 | "string", | |
| 157 | assistant_id="string", | |
| 158 | ) | |
86379b44Stainless Bot2 years ago | 159 | |
| 160 | assert response.is_closed is True | |
baa9f07fRobert Craigie2 years ago | 161 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" |
| 162 | run = response.parse() | |
| 163 | assert_matches_type(Run, run, path=["response"]) | |
| 164 | | |
86379b44Stainless Bot2 years ago | 165 | @parametrize |
5429f696Stainless Bot2 years ago | 166 | def test_streaming_response_create_overload_1(self, client: OpenAI) -> None: |
86379b44Stainless Bot2 years ago | 167 | with client.beta.threads.runs.with_streaming_response.create( |
| 168 | "string", | |
| 169 | assistant_id="string", | |
| 170 | ) as response: | |
| 171 | assert not response.is_closed | |
| 172 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" | |
| 173 | | |
| 174 | run = response.parse() | |
| 175 | assert_matches_type(Run, run, path=["response"]) | |
| 176 | | |
| 177 | assert cast(Any, response.is_closed) is True | |
| 178 | | |
023a4e66Stainless Bot2 years ago | 179 | @parametrize |
5429f696Stainless Bot2 years ago | 180 | def test_path_params_create_overload_1(self, client: OpenAI) -> None: |
023a4e66Stainless Bot2 years ago | 181 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `thread_id` but received ''"): |
| 182 | client.beta.threads.runs.with_raw_response.create( | |
| 183 | "", | |
| 184 | assistant_id="string", | |
| 185 | ) | |
| 186 | | |
5429f696Stainless Bot2 years ago | 187 | @parametrize |
| 188 | def test_method_create_overload_2(self, client: OpenAI) -> None: | |
| 189 | run_stream = client.beta.threads.runs.create( | |
| 190 | "string", | |
| 191 | assistant_id="string", | |
| 192 | stream=True, | |
| 193 | ) | |
| 194 | run_stream.response.close() | |
| 195 | | |
| 196 | @parametrize | |
| 197 | def test_method_create_with_all_params_overload_2(self, client: OpenAI) -> None: | |
| 198 | run_stream = client.beta.threads.runs.create( | |
| 199 | "string", | |
| 200 | assistant_id="string", | |
| 201 | stream=True, | |
| 202 | additional_instructions="string", | |
e2d65bf7Stainless Bot2 years ago | 203 | additional_messages=[ |
| 204 | { | |
79a0b401Stainless Bot2 years ago | 205 | "content": "string", |
092a8df7Stainless Bot1 years ago | 206 | "role": "user", |
5b20698dStainless Bot2 years ago | 207 | "attachments": [ |
| 208 | { | |
| 209 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 210 | "tools": [ |
| 211 | {"type": "code_interpreter"}, | |
| 212 | {"type": "code_interpreter"}, | |
| 213 | {"type": "code_interpreter"}, | |
| 214 | ], | |
5b20698dStainless Bot2 years ago | 215 | }, |
| 216 | { | |
| 217 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 218 | "tools": [ |
| 219 | {"type": "code_interpreter"}, | |
| 220 | {"type": "code_interpreter"}, | |
| 221 | {"type": "code_interpreter"}, | |
| 222 | ], | |
5b20698dStainless Bot2 years ago | 223 | }, |
| 224 | { | |
| 225 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 226 | "tools": [ |
| 227 | {"type": "code_interpreter"}, | |
| 228 | {"type": "code_interpreter"}, | |
| 229 | {"type": "code_interpreter"}, | |
| 230 | ], | |
5b20698dStainless Bot2 years ago | 231 | }, |
| 232 | ], | |
e2d65bf7Stainless Bot2 years ago | 233 | "metadata": {}, |
| 234 | }, | |
| 235 | { | |
79a0b401Stainless Bot2 years ago | 236 | "content": "string", |
092a8df7Stainless Bot1 years ago | 237 | "role": "user", |
5b20698dStainless Bot2 years ago | 238 | "attachments": [ |
| 239 | { | |
| 240 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 241 | "tools": [ |
| 242 | {"type": "code_interpreter"}, | |
| 243 | {"type": "code_interpreter"}, | |
| 244 | {"type": "code_interpreter"}, | |
| 245 | ], | |
5b20698dStainless Bot2 years ago | 246 | }, |
| 247 | { | |
| 248 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 249 | "tools": [ |
| 250 | {"type": "code_interpreter"}, | |
| 251 | {"type": "code_interpreter"}, | |
| 252 | {"type": "code_interpreter"}, | |
| 253 | ], | |
5b20698dStainless Bot2 years ago | 254 | }, |
| 255 | { | |
| 256 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 257 | "tools": [ |
| 258 | {"type": "code_interpreter"}, | |
| 259 | {"type": "code_interpreter"}, | |
| 260 | {"type": "code_interpreter"}, | |
| 261 | ], | |
5b20698dStainless Bot2 years ago | 262 | }, |
| 263 | ], | |
e2d65bf7Stainless Bot2 years ago | 264 | "metadata": {}, |
| 265 | }, | |
| 266 | { | |
79a0b401Stainless Bot2 years ago | 267 | "content": "string", |
092a8df7Stainless Bot1 years ago | 268 | "role": "user", |
5b20698dStainless Bot2 years ago | 269 | "attachments": [ |
| 270 | { | |
| 271 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 272 | "tools": [ |
| 273 | {"type": "code_interpreter"}, | |
| 274 | {"type": "code_interpreter"}, | |
| 275 | {"type": "code_interpreter"}, | |
| 276 | ], | |
5b20698dStainless Bot2 years ago | 277 | }, |
| 278 | { | |
| 279 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 280 | "tools": [ |
| 281 | {"type": "code_interpreter"}, | |
| 282 | {"type": "code_interpreter"}, | |
| 283 | {"type": "code_interpreter"}, | |
| 284 | ], | |
5b20698dStainless Bot2 years ago | 285 | }, |
| 286 | { | |
| 287 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 288 | "tools": [ |
| 289 | {"type": "code_interpreter"}, | |
| 290 | {"type": "code_interpreter"}, | |
| 291 | {"type": "code_interpreter"}, | |
| 292 | ], | |
5b20698dStainless Bot2 years ago | 293 | }, |
| 294 | ], | |
e2d65bf7Stainless Bot2 years ago | 295 | "metadata": {}, |
| 296 | }, | |
| 297 | ], | |
5429f696Stainless Bot2 years ago | 298 | instructions="string", |
f5247e30Stainless Bot2 years ago | 299 | max_completion_tokens=256, |
| 300 | max_prompt_tokens=256, | |
5429f696Stainless Bot2 years ago | 301 | metadata={}, |
bf1ca86cRobert Craigie1 years ago | 302 | model="gpt-4o", |
7399ffc8Stainless Bot2 years ago | 303 | parallel_tool_calls=True, |
bf1ca86cRobert Craigie1 years ago | 304 | response_format="auto", |
27a4626aStainless Bot2 years ago | 305 | temperature=1, |
f5247e30Stainless Bot2 years ago | 306 | tool_choice="none", |
5429f696Stainless Bot2 years ago | 307 | tools=[{"type": "code_interpreter"}, {"type": "code_interpreter"}, {"type": "code_interpreter"}], |
5b20698dStainless Bot2 years ago | 308 | top_p=1, |
f5247e30Stainless Bot2 years ago | 309 | truncation_strategy={ |
| 310 | "type": "auto", | |
| 311 | "last_messages": 1, | |
| 312 | }, | |
5429f696Stainless Bot2 years ago | 313 | ) |
| 314 | run_stream.response.close() | |
| 315 | | |
| 316 | @parametrize | |
| 317 | def test_raw_response_create_overload_2(self, client: OpenAI) -> None: | |
| 318 | response = client.beta.threads.runs.with_raw_response.create( | |
| 319 | "string", | |
| 320 | assistant_id="string", | |
| 321 | stream=True, | |
| 322 | ) | |
| 323 | | |
| 324 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" | |
| 325 | stream = response.parse() | |
| 326 | stream.close() | |
| 327 | | |
| 328 | @parametrize | |
| 329 | def test_streaming_response_create_overload_2(self, client: OpenAI) -> None: | |
| 330 | with client.beta.threads.runs.with_streaming_response.create( | |
| 331 | "string", | |
| 332 | assistant_id="string", | |
| 333 | stream=True, | |
| 334 | ) as response: | |
| 335 | assert not response.is_closed | |
| 336 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" | |
| 337 | | |
| 338 | stream = response.parse() | |
| 339 | stream.close() | |
| 340 | | |
| 341 | assert cast(Any, response.is_closed) is True | |
| 342 | | |
| 343 | @parametrize | |
| 344 | def test_path_params_create_overload_2(self, client: OpenAI) -> None: | |
| 345 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `thread_id` but received ''"): | |
| 346 | client.beta.threads.runs.with_raw_response.create( | |
| 347 | "", | |
| 348 | assistant_id="string", | |
| 349 | stream=True, | |
| 350 | ) | |
| 351 | | |
baa9f07fRobert Craigie2 years ago | 352 | @parametrize |
| 353 | def test_method_retrieve(self, client: OpenAI) -> None: | |
| 354 | run = client.beta.threads.runs.retrieve( | |
| 355 | "string", | |
| 356 | thread_id="string", | |
| 357 | ) | |
| 358 | assert_matches_type(Run, run, path=["response"]) | |
| 359 | | |
| 360 | @parametrize | |
| 361 | def test_raw_response_retrieve(self, client: OpenAI) -> None: | |
| 362 | response = client.beta.threads.runs.with_raw_response.retrieve( | |
| 363 | "string", | |
| 364 | thread_id="string", | |
| 365 | ) | |
86379b44Stainless Bot2 years ago | 366 | |
| 367 | assert response.is_closed is True | |
baa9f07fRobert Craigie2 years ago | 368 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" |
| 369 | run = response.parse() | |
| 370 | assert_matches_type(Run, run, path=["response"]) | |
| 371 | | |
86379b44Stainless Bot2 years ago | 372 | @parametrize |
| 373 | def test_streaming_response_retrieve(self, client: OpenAI) -> None: | |
| 374 | with client.beta.threads.runs.with_streaming_response.retrieve( | |
| 375 | "string", | |
| 376 | thread_id="string", | |
| 377 | ) as response: | |
| 378 | assert not response.is_closed | |
| 379 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" | |
| 380 | | |
| 381 | run = response.parse() | |
| 382 | assert_matches_type(Run, run, path=["response"]) | |
| 383 | | |
| 384 | assert cast(Any, response.is_closed) is True | |
| 385 | | |
023a4e66Stainless Bot2 years ago | 386 | @parametrize |
| 387 | def test_path_params_retrieve(self, client: OpenAI) -> None: | |
| 388 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `thread_id` but received ''"): | |
| 389 | client.beta.threads.runs.with_raw_response.retrieve( | |
| 390 | "string", | |
| 391 | thread_id="", | |
| 392 | ) | |
| 393 | | |
| 394 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `run_id` but received ''"): | |
| 395 | client.beta.threads.runs.with_raw_response.retrieve( | |
| 396 | "", | |
| 397 | thread_id="string", | |
| 398 | ) | |
| 399 | | |
baa9f07fRobert Craigie2 years ago | 400 | @parametrize |
| 401 | def test_method_update(self, client: OpenAI) -> None: | |
| 402 | run = client.beta.threads.runs.update( | |
| 403 | "string", | |
| 404 | thread_id="string", | |
| 405 | ) | |
| 406 | assert_matches_type(Run, run, path=["response"]) | |
| 407 | | |
| 408 | @parametrize | |
| 409 | def test_method_update_with_all_params(self, client: OpenAI) -> None: | |
| 410 | run = client.beta.threads.runs.update( | |
| 411 | "string", | |
| 412 | thread_id="string", | |
| 413 | metadata={}, | |
| 414 | ) | |
| 415 | assert_matches_type(Run, run, path=["response"]) | |
| 416 | | |
| 417 | @parametrize | |
| 418 | def test_raw_response_update(self, client: OpenAI) -> None: | |
| 419 | response = client.beta.threads.runs.with_raw_response.update( | |
| 420 | "string", | |
| 421 | thread_id="string", | |
| 422 | ) | |
86379b44Stainless Bot2 years ago | 423 | |
| 424 | assert response.is_closed is True | |
baa9f07fRobert Craigie2 years ago | 425 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" |
| 426 | run = response.parse() | |
| 427 | assert_matches_type(Run, run, path=["response"]) | |
| 428 | | |
86379b44Stainless Bot2 years ago | 429 | @parametrize |
| 430 | def test_streaming_response_update(self, client: OpenAI) -> None: | |
| 431 | with client.beta.threads.runs.with_streaming_response.update( | |
| 432 | "string", | |
| 433 | thread_id="string", | |
| 434 | ) as response: | |
| 435 | assert not response.is_closed | |
| 436 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" | |
| 437 | | |
| 438 | run = response.parse() | |
| 439 | assert_matches_type(Run, run, path=["response"]) | |
| 440 | | |
| 441 | assert cast(Any, response.is_closed) is True | |
| 442 | | |
023a4e66Stainless Bot2 years ago | 443 | @parametrize |
| 444 | def test_path_params_update(self, client: OpenAI) -> None: | |
| 445 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `thread_id` but received ''"): | |
| 446 | client.beta.threads.runs.with_raw_response.update( | |
| 447 | "string", | |
| 448 | thread_id="", | |
| 449 | ) | |
| 450 | | |
| 451 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `run_id` but received ''"): | |
| 452 | client.beta.threads.runs.with_raw_response.update( | |
| 453 | "", | |
| 454 | thread_id="string", | |
| 455 | ) | |
| 456 | | |
baa9f07fRobert Craigie2 years ago | 457 | @parametrize |
| 458 | def test_method_list(self, client: OpenAI) -> None: | |
| 459 | run = client.beta.threads.runs.list( | |
| 460 | "string", | |
| 461 | ) | |
| 462 | assert_matches_type(SyncCursorPage[Run], run, path=["response"]) | |
| 463 | | |
| 464 | @parametrize | |
| 465 | def test_method_list_with_all_params(self, client: OpenAI) -> None: | |
| 466 | run = client.beta.threads.runs.list( | |
| 467 | "string", | |
| 468 | after="string", | |
| 469 | before="string", | |
| 470 | limit=0, | |
| 471 | order="asc", | |
| 472 | ) | |
| 473 | assert_matches_type(SyncCursorPage[Run], run, path=["response"]) | |
| 474 | | |
| 475 | @parametrize | |
| 476 | def test_raw_response_list(self, client: OpenAI) -> None: | |
| 477 | response = client.beta.threads.runs.with_raw_response.list( | |
| 478 | "string", | |
| 479 | ) | |
86379b44Stainless Bot2 years ago | 480 | |
| 481 | assert response.is_closed is True | |
baa9f07fRobert Craigie2 years ago | 482 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" |
| 483 | run = response.parse() | |
| 484 | assert_matches_type(SyncCursorPage[Run], run, path=["response"]) | |
| 485 | | |
86379b44Stainless Bot2 years ago | 486 | @parametrize |
| 487 | def test_streaming_response_list(self, client: OpenAI) -> None: | |
| 488 | with client.beta.threads.runs.with_streaming_response.list( | |
| 489 | "string", | |
| 490 | ) as response: | |
| 491 | assert not response.is_closed | |
| 492 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" | |
| 493 | | |
| 494 | run = response.parse() | |
| 495 | assert_matches_type(SyncCursorPage[Run], run, path=["response"]) | |
| 496 | | |
| 497 | assert cast(Any, response.is_closed) is True | |
| 498 | | |
023a4e66Stainless Bot2 years ago | 499 | @parametrize |
| 500 | def test_path_params_list(self, client: OpenAI) -> None: | |
| 501 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `thread_id` but received ''"): | |
| 502 | client.beta.threads.runs.with_raw_response.list( | |
| 503 | "", | |
| 504 | ) | |
| 505 | | |
baa9f07fRobert Craigie2 years ago | 506 | @parametrize |
| 507 | def test_method_cancel(self, client: OpenAI) -> None: | |
| 508 | run = client.beta.threads.runs.cancel( | |
| 509 | "string", | |
| 510 | thread_id="string", | |
| 511 | ) | |
| 512 | assert_matches_type(Run, run, path=["response"]) | |
| 513 | | |
| 514 | @parametrize | |
| 515 | def test_raw_response_cancel(self, client: OpenAI) -> None: | |
| 516 | response = client.beta.threads.runs.with_raw_response.cancel( | |
| 517 | "string", | |
| 518 | thread_id="string", | |
| 519 | ) | |
86379b44Stainless Bot2 years ago | 520 | |
| 521 | assert response.is_closed is True | |
baa9f07fRobert Craigie2 years ago | 522 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" |
| 523 | run = response.parse() | |
| 524 | assert_matches_type(Run, run, path=["response"]) | |
| 525 | | |
86379b44Stainless Bot2 years ago | 526 | @parametrize |
| 527 | def test_streaming_response_cancel(self, client: OpenAI) -> None: | |
| 528 | with client.beta.threads.runs.with_streaming_response.cancel( | |
| 529 | "string", | |
| 530 | thread_id="string", | |
| 531 | ) as response: | |
| 532 | assert not response.is_closed | |
| 533 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" | |
| 534 | | |
| 535 | run = response.parse() | |
| 536 | assert_matches_type(Run, run, path=["response"]) | |
| 537 | | |
| 538 | assert cast(Any, response.is_closed) is True | |
| 539 | | |
023a4e66Stainless Bot2 years ago | 540 | @parametrize |
| 541 | def test_path_params_cancel(self, client: OpenAI) -> None: | |
| 542 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `thread_id` but received ''"): | |
| 543 | client.beta.threads.runs.with_raw_response.cancel( | |
| 544 | "string", | |
| 545 | thread_id="", | |
| 546 | ) | |
| 547 | | |
| 548 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `run_id` but received ''"): | |
| 549 | client.beta.threads.runs.with_raw_response.cancel( | |
| 550 | "", | |
| 551 | thread_id="string", | |
| 552 | ) | |
| 553 | | |
baa9f07fRobert Craigie2 years ago | 554 | @parametrize |
5429f696Stainless Bot2 years ago | 555 | def test_method_submit_tool_outputs_overload_1(self, client: OpenAI) -> None: |
baa9f07fRobert Craigie2 years ago | 556 | run = client.beta.threads.runs.submit_tool_outputs( |
| 557 | "string", | |
| 558 | thread_id="string", | |
| 559 | tool_outputs=[{}, {}, {}], | |
| 560 | ) | |
| 561 | assert_matches_type(Run, run, path=["response"]) | |
| 562 | | |
| 563 | @parametrize | |
5429f696Stainless Bot2 years ago | 564 | def test_method_submit_tool_outputs_with_all_params_overload_1(self, client: OpenAI) -> None: |
| 565 | run = client.beta.threads.runs.submit_tool_outputs( | |
| 566 | "string", | |
| 567 | thread_id="string", | |
| 568 | tool_outputs=[ | |
| 569 | { | |
092a8df7Stainless Bot1 years ago | 570 | "output": "output", |
| 571 | "tool_call_id": "tool_call_id", | |
5429f696Stainless Bot2 years ago | 572 | }, |
| 573 | { | |
092a8df7Stainless Bot1 years ago | 574 | "output": "output", |
| 575 | "tool_call_id": "tool_call_id", | |
5429f696Stainless Bot2 years ago | 576 | }, |
| 577 | { | |
092a8df7Stainless Bot1 years ago | 578 | "output": "output", |
| 579 | "tool_call_id": "tool_call_id", | |
5429f696Stainless Bot2 years ago | 580 | }, |
| 581 | ], | |
| 582 | stream=False, | |
| 583 | ) | |
| 584 | assert_matches_type(Run, run, path=["response"]) | |
| 585 | | |
| 586 | @parametrize | |
| 587 | def test_raw_response_submit_tool_outputs_overload_1(self, client: OpenAI) -> None: | |
baa9f07fRobert Craigie2 years ago | 588 | response = client.beta.threads.runs.with_raw_response.submit_tool_outputs( |
| 589 | "string", | |
| 590 | thread_id="string", | |
| 591 | tool_outputs=[{}, {}, {}], | |
| 592 | ) | |
86379b44Stainless Bot2 years ago | 593 | |
| 594 | assert response.is_closed is True | |
baa9f07fRobert Craigie2 years ago | 595 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" |
| 596 | run = response.parse() | |
| 597 | assert_matches_type(Run, run, path=["response"]) | |
| 598 | | |
86379b44Stainless Bot2 years ago | 599 | @parametrize |
5429f696Stainless Bot2 years ago | 600 | def test_streaming_response_submit_tool_outputs_overload_1(self, client: OpenAI) -> None: |
86379b44Stainless Bot2 years ago | 601 | with client.beta.threads.runs.with_streaming_response.submit_tool_outputs( |
| 602 | "string", | |
| 603 | thread_id="string", | |
| 604 | tool_outputs=[{}, {}, {}], | |
| 605 | ) as response: | |
| 606 | assert not response.is_closed | |
| 607 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" | |
| 608 | | |
| 609 | run = response.parse() | |
| 610 | assert_matches_type(Run, run, path=["response"]) | |
| 611 | | |
| 612 | assert cast(Any, response.is_closed) is True | |
| 613 | | |
023a4e66Stainless Bot2 years ago | 614 | @parametrize |
5429f696Stainless Bot2 years ago | 615 | def test_path_params_submit_tool_outputs_overload_1(self, client: OpenAI) -> None: |
| 616 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `thread_id` but received ''"): | |
| 617 | client.beta.threads.runs.with_raw_response.submit_tool_outputs( | |
| 618 | "string", | |
| 619 | thread_id="", | |
| 620 | tool_outputs=[{}, {}, {}], | |
| 621 | ) | |
| 622 | | |
| 623 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `run_id` but received ''"): | |
| 624 | client.beta.threads.runs.with_raw_response.submit_tool_outputs( | |
| 625 | "", | |
| 626 | thread_id="string", | |
| 627 | tool_outputs=[{}, {}, {}], | |
| 628 | ) | |
| 629 | | |
| 630 | @parametrize | |
| 631 | def test_method_submit_tool_outputs_overload_2(self, client: OpenAI) -> None: | |
| 632 | run_stream = client.beta.threads.runs.submit_tool_outputs( | |
| 633 | "string", | |
| 634 | thread_id="string", | |
| 635 | stream=True, | |
| 636 | tool_outputs=[{}, {}, {}], | |
| 637 | ) | |
| 638 | run_stream.response.close() | |
| 639 | | |
| 640 | @parametrize | |
| 641 | def test_raw_response_submit_tool_outputs_overload_2(self, client: OpenAI) -> None: | |
| 642 | response = client.beta.threads.runs.with_raw_response.submit_tool_outputs( | |
| 643 | "string", | |
| 644 | thread_id="string", | |
| 645 | stream=True, | |
| 646 | tool_outputs=[{}, {}, {}], | |
| 647 | ) | |
| 648 | | |
| 649 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" | |
| 650 | stream = response.parse() | |
| 651 | stream.close() | |
| 652 | | |
| 653 | @parametrize | |
| 654 | def test_streaming_response_submit_tool_outputs_overload_2(self, client: OpenAI) -> None: | |
| 655 | with client.beta.threads.runs.with_streaming_response.submit_tool_outputs( | |
| 656 | "string", | |
| 657 | thread_id="string", | |
| 658 | stream=True, | |
| 659 | tool_outputs=[{}, {}, {}], | |
| 660 | ) as response: | |
| 661 | assert not response.is_closed | |
| 662 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" | |
| 663 | | |
| 664 | stream = response.parse() | |
| 665 | stream.close() | |
| 666 | | |
| 667 | assert cast(Any, response.is_closed) is True | |
| 668 | | |
| 669 | @parametrize | |
| 670 | def test_path_params_submit_tool_outputs_overload_2(self, client: OpenAI) -> None: | |
023a4e66Stainless Bot2 years ago | 671 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `thread_id` but received ''"): |
| 672 | client.beta.threads.runs.with_raw_response.submit_tool_outputs( | |
| 673 | "string", | |
| 674 | thread_id="", | |
5429f696Stainless Bot2 years ago | 675 | stream=True, |
023a4e66Stainless Bot2 years ago | 676 | tool_outputs=[{}, {}, {}], |
| 677 | ) | |
| 678 | | |
| 679 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `run_id` but received ''"): | |
| 680 | client.beta.threads.runs.with_raw_response.submit_tool_outputs( | |
| 681 | "", | |
| 682 | thread_id="string", | |
5429f696Stainless Bot2 years ago | 683 | stream=True, |
023a4e66Stainless Bot2 years ago | 684 | tool_outputs=[{}, {}, {}], |
| 685 | ) | |
| 686 | | |
baa9f07fRobert Craigie2 years ago | 687 | |
| 688 | class TestAsyncRuns: | |
98d779fbStainless Bot2 years ago | 689 | parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) |
baa9f07fRobert Craigie2 years ago | 690 | |
| 691 | @parametrize | |
5429f696Stainless Bot2 years ago | 692 | async def test_method_create_overload_1(self, async_client: AsyncOpenAI) -> None: |
98d779fbStainless Bot2 years ago | 693 | run = await async_client.beta.threads.runs.create( |
baa9f07fRobert Craigie2 years ago | 694 | "string", |
| 695 | assistant_id="string", | |
| 696 | ) | |
| 697 | assert_matches_type(Run, run, path=["response"]) | |
| 698 | | |
| 699 | @parametrize | |
5429f696Stainless Bot2 years ago | 700 | async def test_method_create_with_all_params_overload_1(self, async_client: AsyncOpenAI) -> None: |
98d779fbStainless Bot2 years ago | 701 | run = await async_client.beta.threads.runs.create( |
baa9f07fRobert Craigie2 years ago | 702 | "string", |
| 703 | assistant_id="string", | |
53bca49eStainless Bot2 years ago | 704 | additional_instructions="string", |
e2d65bf7Stainless Bot2 years ago | 705 | additional_messages=[ |
| 706 | { | |
79a0b401Stainless Bot2 years ago | 707 | "content": "string", |
092a8df7Stainless Bot1 years ago | 708 | "role": "user", |
5b20698dStainless Bot2 years ago | 709 | "attachments": [ |
| 710 | { | |
| 711 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 712 | "tools": [ |
| 713 | {"type": "code_interpreter"}, | |
| 714 | {"type": "code_interpreter"}, | |
| 715 | {"type": "code_interpreter"}, | |
| 716 | ], | |
5b20698dStainless Bot2 years ago | 717 | }, |
| 718 | { | |
| 719 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 720 | "tools": [ |
| 721 | {"type": "code_interpreter"}, | |
| 722 | {"type": "code_interpreter"}, | |
| 723 | {"type": "code_interpreter"}, | |
| 724 | ], | |
5b20698dStainless Bot2 years ago | 725 | }, |
| 726 | { | |
| 727 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 728 | "tools": [ |
| 729 | {"type": "code_interpreter"}, | |
| 730 | {"type": "code_interpreter"}, | |
| 731 | {"type": "code_interpreter"}, | |
| 732 | ], | |
5b20698dStainless Bot2 years ago | 733 | }, |
| 734 | ], | |
e2d65bf7Stainless Bot2 years ago | 735 | "metadata": {}, |
| 736 | }, | |
| 737 | { | |
79a0b401Stainless Bot2 years ago | 738 | "content": "string", |
092a8df7Stainless Bot1 years ago | 739 | "role": "user", |
5b20698dStainless Bot2 years ago | 740 | "attachments": [ |
| 741 | { | |
| 742 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 743 | "tools": [ |
| 744 | {"type": "code_interpreter"}, | |
| 745 | {"type": "code_interpreter"}, | |
| 746 | {"type": "code_interpreter"}, | |
| 747 | ], | |
5b20698dStainless Bot2 years ago | 748 | }, |
| 749 | { | |
| 750 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 751 | "tools": [ |
| 752 | {"type": "code_interpreter"}, | |
| 753 | {"type": "code_interpreter"}, | |
| 754 | {"type": "code_interpreter"}, | |
| 755 | ], | |
5b20698dStainless Bot2 years ago | 756 | }, |
| 757 | { | |
| 758 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 759 | "tools": [ |
| 760 | {"type": "code_interpreter"}, | |
| 761 | {"type": "code_interpreter"}, | |
| 762 | {"type": "code_interpreter"}, | |
| 763 | ], | |
5b20698dStainless Bot2 years ago | 764 | }, |
| 765 | ], | |
e2d65bf7Stainless Bot2 years ago | 766 | "metadata": {}, |
| 767 | }, | |
| 768 | { | |
79a0b401Stainless Bot2 years ago | 769 | "content": "string", |
092a8df7Stainless Bot1 years ago | 770 | "role": "user", |
5b20698dStainless Bot2 years ago | 771 | "attachments": [ |
| 772 | { | |
| 773 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 774 | "tools": [ |
| 775 | {"type": "code_interpreter"}, | |
| 776 | {"type": "code_interpreter"}, | |
| 777 | {"type": "code_interpreter"}, | |
| 778 | ], | |
5b20698dStainless Bot2 years ago | 779 | }, |
| 780 | { | |
| 781 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 782 | "tools": [ |
| 783 | {"type": "code_interpreter"}, | |
| 784 | {"type": "code_interpreter"}, | |
| 785 | {"type": "code_interpreter"}, | |
| 786 | ], | |
5b20698dStainless Bot2 years ago | 787 | }, |
| 788 | { | |
| 789 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 790 | "tools": [ |
| 791 | {"type": "code_interpreter"}, | |
| 792 | {"type": "code_interpreter"}, | |
| 793 | {"type": "code_interpreter"}, | |
| 794 | ], | |
5b20698dStainless Bot2 years ago | 795 | }, |
| 796 | ], | |
e2d65bf7Stainless Bot2 years ago | 797 | "metadata": {}, |
| 798 | }, | |
| 799 | ], | |
baa9f07fRobert Craigie2 years ago | 800 | instructions="string", |
f5247e30Stainless Bot2 years ago | 801 | max_completion_tokens=256, |
| 802 | max_prompt_tokens=256, | |
baa9f07fRobert Craigie2 years ago | 803 | metadata={}, |
bf1ca86cRobert Craigie1 years ago | 804 | model="gpt-4o", |
7399ffc8Stainless Bot2 years ago | 805 | parallel_tool_calls=True, |
bf1ca86cRobert Craigie1 years ago | 806 | response_format="auto", |
5429f696Stainless Bot2 years ago | 807 | stream=False, |
27a4626aStainless Bot2 years ago | 808 | temperature=1, |
f5247e30Stainless Bot2 years ago | 809 | tool_choice="none", |
baa9f07fRobert Craigie2 years ago | 810 | tools=[{"type": "code_interpreter"}, {"type": "code_interpreter"}, {"type": "code_interpreter"}], |
5b20698dStainless Bot2 years ago | 811 | top_p=1, |
f5247e30Stainless Bot2 years ago | 812 | truncation_strategy={ |
| 813 | "type": "auto", | |
| 814 | "last_messages": 1, | |
| 815 | }, | |
baa9f07fRobert Craigie2 years ago | 816 | ) |
| 817 | assert_matches_type(Run, run, path=["response"]) | |
| 818 | | |
| 819 | @parametrize | |
5429f696Stainless Bot2 years ago | 820 | async def test_raw_response_create_overload_1(self, async_client: AsyncOpenAI) -> None: |
98d779fbStainless Bot2 years ago | 821 | response = await async_client.beta.threads.runs.with_raw_response.create( |
baa9f07fRobert Craigie2 years ago | 822 | "string", |
| 823 | assistant_id="string", | |
| 824 | ) | |
86379b44Stainless Bot2 years ago | 825 | |
| 826 | assert response.is_closed is True | |
baa9f07fRobert Craigie2 years ago | 827 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" |
| 828 | run = response.parse() | |
| 829 | assert_matches_type(Run, run, path=["response"]) | |
| 830 | | |
86379b44Stainless Bot2 years ago | 831 | @parametrize |
5429f696Stainless Bot2 years ago | 832 | async def test_streaming_response_create_overload_1(self, async_client: AsyncOpenAI) -> None: |
98d779fbStainless Bot2 years ago | 833 | async with async_client.beta.threads.runs.with_streaming_response.create( |
86379b44Stainless Bot2 years ago | 834 | "string", |
| 835 | assistant_id="string", | |
| 836 | ) as response: | |
| 837 | assert not response.is_closed | |
| 838 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" | |
| 839 | | |
| 840 | run = await response.parse() | |
| 841 | assert_matches_type(Run, run, path=["response"]) | |
| 842 | | |
| 843 | assert cast(Any, response.is_closed) is True | |
| 844 | | |
023a4e66Stainless Bot2 years ago | 845 | @parametrize |
5429f696Stainless Bot2 years ago | 846 | async def test_path_params_create_overload_1(self, async_client: AsyncOpenAI) -> None: |
023a4e66Stainless Bot2 years ago | 847 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `thread_id` but received ''"): |
98d779fbStainless Bot2 years ago | 848 | await async_client.beta.threads.runs.with_raw_response.create( |
023a4e66Stainless Bot2 years ago | 849 | "", |
| 850 | assistant_id="string", | |
| 851 | ) | |
| 852 | | |
5429f696Stainless Bot2 years ago | 853 | @parametrize |
| 854 | async def test_method_create_overload_2(self, async_client: AsyncOpenAI) -> None: | |
| 855 | run_stream = await async_client.beta.threads.runs.create( | |
| 856 | "string", | |
| 857 | assistant_id="string", | |
| 858 | stream=True, | |
| 859 | ) | |
| 860 | await run_stream.response.aclose() | |
| 861 | | |
| 862 | @parametrize | |
| 863 | async def test_method_create_with_all_params_overload_2(self, async_client: AsyncOpenAI) -> None: | |
| 864 | run_stream = await async_client.beta.threads.runs.create( | |
| 865 | "string", | |
| 866 | assistant_id="string", | |
| 867 | stream=True, | |
| 868 | additional_instructions="string", | |
e2d65bf7Stainless Bot2 years ago | 869 | additional_messages=[ |
| 870 | { | |
79a0b401Stainless Bot2 years ago | 871 | "content": "string", |
092a8df7Stainless Bot1 years ago | 872 | "role": "user", |
5b20698dStainless Bot2 years ago | 873 | "attachments": [ |
| 874 | { | |
| 875 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 876 | "tools": [ |
| 877 | {"type": "code_interpreter"}, | |
| 878 | {"type": "code_interpreter"}, | |
| 879 | {"type": "code_interpreter"}, | |
| 880 | ], | |
5b20698dStainless Bot2 years ago | 881 | }, |
| 882 | { | |
| 883 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 884 | "tools": [ |
| 885 | {"type": "code_interpreter"}, | |
| 886 | {"type": "code_interpreter"}, | |
| 887 | {"type": "code_interpreter"}, | |
| 888 | ], | |
5b20698dStainless Bot2 years ago | 889 | }, |
| 890 | { | |
| 891 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 892 | "tools": [ |
| 893 | {"type": "code_interpreter"}, | |
| 894 | {"type": "code_interpreter"}, | |
| 895 | {"type": "code_interpreter"}, | |
| 896 | ], | |
5b20698dStainless Bot2 years ago | 897 | }, |
| 898 | ], | |
e2d65bf7Stainless Bot2 years ago | 899 | "metadata": {}, |
| 900 | }, | |
| 901 | { | |
79a0b401Stainless Bot2 years ago | 902 | "content": "string", |
092a8df7Stainless Bot1 years ago | 903 | "role": "user", |
5b20698dStainless Bot2 years ago | 904 | "attachments": [ |
| 905 | { | |
| 906 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 907 | "tools": [ |
| 908 | {"type": "code_interpreter"}, | |
| 909 | {"type": "code_interpreter"}, | |
| 910 | {"type": "code_interpreter"}, | |
| 911 | ], | |
5b20698dStainless Bot2 years ago | 912 | }, |
| 913 | { | |
| 914 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 915 | "tools": [ |
| 916 | {"type": "code_interpreter"}, | |
| 917 | {"type": "code_interpreter"}, | |
| 918 | {"type": "code_interpreter"}, | |
| 919 | ], | |
5b20698dStainless Bot2 years ago | 920 | }, |
| 921 | { | |
| 922 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 923 | "tools": [ |
| 924 | {"type": "code_interpreter"}, | |
| 925 | {"type": "code_interpreter"}, | |
| 926 | {"type": "code_interpreter"}, | |
| 927 | ], | |
5b20698dStainless Bot2 years ago | 928 | }, |
| 929 | ], | |
e2d65bf7Stainless Bot2 years ago | 930 | "metadata": {}, |
| 931 | }, | |
| 932 | { | |
79a0b401Stainless Bot2 years ago | 933 | "content": "string", |
092a8df7Stainless Bot1 years ago | 934 | "role": "user", |
5b20698dStainless Bot2 years ago | 935 | "attachments": [ |
| 936 | { | |
| 937 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 938 | "tools": [ |
| 939 | {"type": "code_interpreter"}, | |
| 940 | {"type": "code_interpreter"}, | |
| 941 | {"type": "code_interpreter"}, | |
| 942 | ], | |
5b20698dStainless Bot2 years ago | 943 | }, |
| 944 | { | |
| 945 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 946 | "tools": [ |
| 947 | {"type": "code_interpreter"}, | |
| 948 | {"type": "code_interpreter"}, | |
| 949 | {"type": "code_interpreter"}, | |
| 950 | ], | |
5b20698dStainless Bot2 years ago | 951 | }, |
| 952 | { | |
| 953 | "file_id": "string", | |
f73996b7Stainless Bot2 years ago | 954 | "tools": [ |
| 955 | {"type": "code_interpreter"}, | |
| 956 | {"type": "code_interpreter"}, | |
| 957 | {"type": "code_interpreter"}, | |
| 958 | ], | |
5b20698dStainless Bot2 years ago | 959 | }, |
| 960 | ], | |
e2d65bf7Stainless Bot2 years ago | 961 | "metadata": {}, |
| 962 | }, | |
| 963 | ], | |
5429f696Stainless Bot2 years ago | 964 | instructions="string", |
f5247e30Stainless Bot2 years ago | 965 | max_completion_tokens=256, |
| 966 | max_prompt_tokens=256, | |
5429f696Stainless Bot2 years ago | 967 | metadata={}, |
bf1ca86cRobert Craigie1 years ago | 968 | model="gpt-4o", |
7399ffc8Stainless Bot2 years ago | 969 | parallel_tool_calls=True, |
bf1ca86cRobert Craigie1 years ago | 970 | response_format="auto", |
27a4626aStainless Bot2 years ago | 971 | temperature=1, |
f5247e30Stainless Bot2 years ago | 972 | tool_choice="none", |
5429f696Stainless Bot2 years ago | 973 | tools=[{"type": "code_interpreter"}, {"type": "code_interpreter"}, {"type": "code_interpreter"}], |
5b20698dStainless Bot2 years ago | 974 | top_p=1, |
f5247e30Stainless Bot2 years ago | 975 | truncation_strategy={ |
| 976 | "type": "auto", | |
| 977 | "last_messages": 1, | |
| 978 | }, | |
5429f696Stainless Bot2 years ago | 979 | ) |
| 980 | await run_stream.response.aclose() | |
| 981 | | |
| 982 | @parametrize | |
| 983 | async def test_raw_response_create_overload_2(self, async_client: AsyncOpenAI) -> None: | |
| 984 | response = await async_client.beta.threads.runs.with_raw_response.create( | |
| 985 | "string", | |
| 986 | assistant_id="string", | |
| 987 | stream=True, | |
| 988 | ) | |
| 989 | | |
| 990 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" | |
| 991 | stream = response.parse() | |
| 992 | await stream.close() | |
| 993 | | |
| 994 | @parametrize | |
| 995 | async def test_streaming_response_create_overload_2(self, async_client: AsyncOpenAI) -> None: | |
| 996 | async with async_client.beta.threads.runs.with_streaming_response.create( | |
| 997 | "string", | |
| 998 | assistant_id="string", | |
| 999 | stream=True, | |
| 1000 | ) as response: | |
| 1001 | assert not response.is_closed | |
| 1002 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" | |
| 1003 | | |
| 1004 | stream = await response.parse() | |
| 1005 | await stream.close() | |
| 1006 | | |
| 1007 | assert cast(Any, response.is_closed) is True | |
| 1008 | | |
| 1009 | @parametrize | |
| 1010 | async def test_path_params_create_overload_2(self, async_client: AsyncOpenAI) -> None: | |
| 1011 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `thread_id` but received ''"): | |
| 1012 | await async_client.beta.threads.runs.with_raw_response.create( | |
| 1013 | "", | |
| 1014 | assistant_id="string", | |
| 1015 | stream=True, | |
| 1016 | ) | |
| 1017 | | |
baa9f07fRobert Craigie2 years ago | 1018 | @parametrize |
98d779fbStainless Bot2 years ago | 1019 | async def test_method_retrieve(self, async_client: AsyncOpenAI) -> None: |
| 1020 | run = await async_client.beta.threads.runs.retrieve( | |
baa9f07fRobert Craigie2 years ago | 1021 | "string", |
| 1022 | thread_id="string", | |
| 1023 | ) | |
| 1024 | assert_matches_type(Run, run, path=["response"]) | |
| 1025 | | |
| 1026 | @parametrize | |
98d779fbStainless Bot2 years ago | 1027 | async def test_raw_response_retrieve(self, async_client: AsyncOpenAI) -> None: |
| 1028 | response = await async_client.beta.threads.runs.with_raw_response.retrieve( | |
baa9f07fRobert Craigie2 years ago | 1029 | "string", |
| 1030 | thread_id="string", | |
| 1031 | ) | |
86379b44Stainless Bot2 years ago | 1032 | |
| 1033 | assert response.is_closed is True | |
baa9f07fRobert Craigie2 years ago | 1034 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" |
| 1035 | run = response.parse() | |
| 1036 | assert_matches_type(Run, run, path=["response"]) | |
| 1037 | | |
86379b44Stainless Bot2 years ago | 1038 | @parametrize |
98d779fbStainless Bot2 years ago | 1039 | async def test_streaming_response_retrieve(self, async_client: AsyncOpenAI) -> None: |
| 1040 | async with async_client.beta.threads.runs.with_streaming_response.retrieve( | |
86379b44Stainless Bot2 years ago | 1041 | "string", |
| 1042 | thread_id="string", | |
| 1043 | ) as response: | |
| 1044 | assert not response.is_closed | |
| 1045 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" | |
| 1046 | | |
| 1047 | run = await response.parse() | |
| 1048 | assert_matches_type(Run, run, path=["response"]) | |
| 1049 | | |
| 1050 | assert cast(Any, response.is_closed) is True | |
| 1051 | | |
023a4e66Stainless Bot2 years ago | 1052 | @parametrize |
98d779fbStainless Bot2 years ago | 1053 | async def test_path_params_retrieve(self, async_client: AsyncOpenAI) -> None: |
023a4e66Stainless Bot2 years ago | 1054 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `thread_id` but received ''"): |
98d779fbStainless Bot2 years ago | 1055 | await async_client.beta.threads.runs.with_raw_response.retrieve( |
023a4e66Stainless Bot2 years ago | 1056 | "string", |
| 1057 | thread_id="", | |
| 1058 | ) | |
| 1059 | | |
| 1060 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `run_id` but received ''"): | |
98d779fbStainless Bot2 years ago | 1061 | await async_client.beta.threads.runs.with_raw_response.retrieve( |
023a4e66Stainless Bot2 years ago | 1062 | "", |
| 1063 | thread_id="string", | |
| 1064 | ) | |
| 1065 | | |
baa9f07fRobert Craigie2 years ago | 1066 | @parametrize |
98d779fbStainless Bot2 years ago | 1067 | async def test_method_update(self, async_client: AsyncOpenAI) -> None: |
| 1068 | run = await async_client.beta.threads.runs.update( | |
baa9f07fRobert Craigie2 years ago | 1069 | "string", |
| 1070 | thread_id="string", | |
| 1071 | ) | |
| 1072 | assert_matches_type(Run, run, path=["response"]) | |
| 1073 | | |
| 1074 | @parametrize | |
98d779fbStainless Bot2 years ago | 1075 | async def test_method_update_with_all_params(self, async_client: AsyncOpenAI) -> None: |
| 1076 | run = await async_client.beta.threads.runs.update( | |
baa9f07fRobert Craigie2 years ago | 1077 | "string", |
| 1078 | thread_id="string", | |
| 1079 | metadata={}, | |
| 1080 | ) | |
| 1081 | assert_matches_type(Run, run, path=["response"]) | |
| 1082 | | |
| 1083 | @parametrize | |
98d779fbStainless Bot2 years ago | 1084 | async def test_raw_response_update(self, async_client: AsyncOpenAI) -> None: |
| 1085 | response = await async_client.beta.threads.runs.with_raw_response.update( | |
baa9f07fRobert Craigie2 years ago | 1086 | "string", |
| 1087 | thread_id="string", | |
| 1088 | ) | |
86379b44Stainless Bot2 years ago | 1089 | |
| 1090 | assert response.is_closed is True | |
baa9f07fRobert Craigie2 years ago | 1091 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" |
| 1092 | run = response.parse() | |
| 1093 | assert_matches_type(Run, run, path=["response"]) | |
| 1094 | | |
86379b44Stainless Bot2 years ago | 1095 | @parametrize |
98d779fbStainless Bot2 years ago | 1096 | async def test_streaming_response_update(self, async_client: AsyncOpenAI) -> None: |
| 1097 | async with async_client.beta.threads.runs.with_streaming_response.update( | |
86379b44Stainless Bot2 years ago | 1098 | "string", |
| 1099 | thread_id="string", | |
| 1100 | ) as response: | |
| 1101 | assert not response.is_closed | |
| 1102 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" | |
| 1103 | | |
| 1104 | run = await response.parse() | |
| 1105 | assert_matches_type(Run, run, path=["response"]) | |
| 1106 | | |
| 1107 | assert cast(Any, response.is_closed) is True | |
| 1108 | | |
023a4e66Stainless Bot2 years ago | 1109 | @parametrize |
98d779fbStainless Bot2 years ago | 1110 | async def test_path_params_update(self, async_client: AsyncOpenAI) -> None: |
023a4e66Stainless Bot2 years ago | 1111 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `thread_id` but received ''"): |
98d779fbStainless Bot2 years ago | 1112 | await async_client.beta.threads.runs.with_raw_response.update( |
023a4e66Stainless Bot2 years ago | 1113 | "string", |
| 1114 | thread_id="", | |
| 1115 | ) | |
| 1116 | | |
| 1117 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `run_id` but received ''"): | |
98d779fbStainless Bot2 years ago | 1118 | await async_client.beta.threads.runs.with_raw_response.update( |
023a4e66Stainless Bot2 years ago | 1119 | "", |
| 1120 | thread_id="string", | |
| 1121 | ) | |
| 1122 | | |
baa9f07fRobert Craigie2 years ago | 1123 | @parametrize |
98d779fbStainless Bot2 years ago | 1124 | async def test_method_list(self, async_client: AsyncOpenAI) -> None: |
| 1125 | run = await async_client.beta.threads.runs.list( | |
baa9f07fRobert Craigie2 years ago | 1126 | "string", |
| 1127 | ) | |
| 1128 | assert_matches_type(AsyncCursorPage[Run], run, path=["response"]) | |
| 1129 | | |
| 1130 | @parametrize | |
98d779fbStainless Bot2 years ago | 1131 | async def test_method_list_with_all_params(self, async_client: AsyncOpenAI) -> None: |
| 1132 | run = await async_client.beta.threads.runs.list( | |
baa9f07fRobert Craigie2 years ago | 1133 | "string", |
| 1134 | after="string", | |
| 1135 | before="string", | |
| 1136 | limit=0, | |
| 1137 | order="asc", | |
| 1138 | ) | |
| 1139 | assert_matches_type(AsyncCursorPage[Run], run, path=["response"]) | |
| 1140 | | |
| 1141 | @parametrize | |
98d779fbStainless Bot2 years ago | 1142 | async def test_raw_response_list(self, async_client: AsyncOpenAI) -> None: |
| 1143 | response = await async_client.beta.threads.runs.with_raw_response.list( | |
baa9f07fRobert Craigie2 years ago | 1144 | "string", |
| 1145 | ) | |
86379b44Stainless Bot2 years ago | 1146 | |
| 1147 | assert response.is_closed is True | |
baa9f07fRobert Craigie2 years ago | 1148 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" |
| 1149 | run = response.parse() | |
| 1150 | assert_matches_type(AsyncCursorPage[Run], run, path=["response"]) | |
| 1151 | | |
86379b44Stainless Bot2 years ago | 1152 | @parametrize |
98d779fbStainless Bot2 years ago | 1153 | async def test_streaming_response_list(self, async_client: AsyncOpenAI) -> None: |
| 1154 | async with async_client.beta.threads.runs.with_streaming_response.list( | |
86379b44Stainless Bot2 years ago | 1155 | "string", |
| 1156 | ) as response: | |
| 1157 | assert not response.is_closed | |
| 1158 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" | |
| 1159 | | |
| 1160 | run = await response.parse() | |
| 1161 | assert_matches_type(AsyncCursorPage[Run], run, path=["response"]) | |
| 1162 | | |
| 1163 | assert cast(Any, response.is_closed) is True | |
| 1164 | | |
023a4e66Stainless Bot2 years ago | 1165 | @parametrize |
98d779fbStainless Bot2 years ago | 1166 | async def test_path_params_list(self, async_client: AsyncOpenAI) -> None: |
023a4e66Stainless Bot2 years ago | 1167 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `thread_id` but received ''"): |
98d779fbStainless Bot2 years ago | 1168 | await async_client.beta.threads.runs.with_raw_response.list( |
023a4e66Stainless Bot2 years ago | 1169 | "", |
| 1170 | ) | |
| 1171 | | |
baa9f07fRobert Craigie2 years ago | 1172 | @parametrize |
98d779fbStainless Bot2 years ago | 1173 | async def test_method_cancel(self, async_client: AsyncOpenAI) -> None: |
| 1174 | run = await async_client.beta.threads.runs.cancel( | |
baa9f07fRobert Craigie2 years ago | 1175 | "string", |
| 1176 | thread_id="string", | |
| 1177 | ) | |
| 1178 | assert_matches_type(Run, run, path=["response"]) | |
| 1179 | | |
| 1180 | @parametrize | |
98d779fbStainless Bot2 years ago | 1181 | async def test_raw_response_cancel(self, async_client: AsyncOpenAI) -> None: |
| 1182 | response = await async_client.beta.threads.runs.with_raw_response.cancel( | |
baa9f07fRobert Craigie2 years ago | 1183 | "string", |
| 1184 | thread_id="string", | |
| 1185 | ) | |
86379b44Stainless Bot2 years ago | 1186 | |
| 1187 | assert response.is_closed is True | |
baa9f07fRobert Craigie2 years ago | 1188 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" |
| 1189 | run = response.parse() | |
| 1190 | assert_matches_type(Run, run, path=["response"]) | |
| 1191 | | |
86379b44Stainless Bot2 years ago | 1192 | @parametrize |
98d779fbStainless Bot2 years ago | 1193 | async def test_streaming_response_cancel(self, async_client: AsyncOpenAI) -> None: |
| 1194 | async with async_client.beta.threads.runs.with_streaming_response.cancel( | |
86379b44Stainless Bot2 years ago | 1195 | "string", |
| 1196 | thread_id="string", | |
| 1197 | ) as response: | |
| 1198 | assert not response.is_closed | |
| 1199 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" | |
| 1200 | | |
| 1201 | run = await response.parse() | |
| 1202 | assert_matches_type(Run, run, path=["response"]) | |
| 1203 | | |
| 1204 | assert cast(Any, response.is_closed) is True | |
| 1205 | | |
023a4e66Stainless Bot2 years ago | 1206 | @parametrize |
98d779fbStainless Bot2 years ago | 1207 | async def test_path_params_cancel(self, async_client: AsyncOpenAI) -> None: |
023a4e66Stainless Bot2 years ago | 1208 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `thread_id` but received ''"): |
98d779fbStainless Bot2 years ago | 1209 | await async_client.beta.threads.runs.with_raw_response.cancel( |
023a4e66Stainless Bot2 years ago | 1210 | "string", |
| 1211 | thread_id="", | |
| 1212 | ) | |
| 1213 | | |
| 1214 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `run_id` but received ''"): | |
98d779fbStainless Bot2 years ago | 1215 | await async_client.beta.threads.runs.with_raw_response.cancel( |
023a4e66Stainless Bot2 years ago | 1216 | "", |
| 1217 | thread_id="string", | |
| 1218 | ) | |
| 1219 | | |
baa9f07fRobert Craigie2 years ago | 1220 | @parametrize |
5429f696Stainless Bot2 years ago | 1221 | async def test_method_submit_tool_outputs_overload_1(self, async_client: AsyncOpenAI) -> None: |
98d779fbStainless Bot2 years ago | 1222 | run = await async_client.beta.threads.runs.submit_tool_outputs( |
baa9f07fRobert Craigie2 years ago | 1223 | "string", |
| 1224 | thread_id="string", | |
| 1225 | tool_outputs=[{}, {}, {}], | |
| 1226 | ) | |
| 1227 | assert_matches_type(Run, run, path=["response"]) | |
| 1228 | | |
| 1229 | @parametrize | |
5429f696Stainless Bot2 years ago | 1230 | async def test_method_submit_tool_outputs_with_all_params_overload_1(self, async_client: AsyncOpenAI) -> None: |
| 1231 | run = await async_client.beta.threads.runs.submit_tool_outputs( | |
| 1232 | "string", | |
| 1233 | thread_id="string", | |
| 1234 | tool_outputs=[ | |
| 1235 | { | |
092a8df7Stainless Bot1 years ago | 1236 | "output": "output", |
| 1237 | "tool_call_id": "tool_call_id", | |
5429f696Stainless Bot2 years ago | 1238 | }, |
| 1239 | { | |
092a8df7Stainless Bot1 years ago | 1240 | "output": "output", |
| 1241 | "tool_call_id": "tool_call_id", | |
5429f696Stainless Bot2 years ago | 1242 | }, |
| 1243 | { | |
092a8df7Stainless Bot1 years ago | 1244 | "output": "output", |
| 1245 | "tool_call_id": "tool_call_id", | |
5429f696Stainless Bot2 years ago | 1246 | }, |
| 1247 | ], | |
| 1248 | stream=False, | |
| 1249 | ) | |
| 1250 | assert_matches_type(Run, run, path=["response"]) | |
| 1251 | | |
| 1252 | @parametrize | |
| 1253 | async def test_raw_response_submit_tool_outputs_overload_1(self, async_client: AsyncOpenAI) -> None: | |
98d779fbStainless Bot2 years ago | 1254 | response = await async_client.beta.threads.runs.with_raw_response.submit_tool_outputs( |
baa9f07fRobert Craigie2 years ago | 1255 | "string", |
| 1256 | thread_id="string", | |
| 1257 | tool_outputs=[{}, {}, {}], | |
| 1258 | ) | |
86379b44Stainless Bot2 years ago | 1259 | |
| 1260 | assert response.is_closed is True | |
baa9f07fRobert Craigie2 years ago | 1261 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" |
| 1262 | run = response.parse() | |
| 1263 | assert_matches_type(Run, run, path=["response"]) | |
86379b44Stainless Bot2 years ago | 1264 | |
| 1265 | @parametrize | |
5429f696Stainless Bot2 years ago | 1266 | async def test_streaming_response_submit_tool_outputs_overload_1(self, async_client: AsyncOpenAI) -> None: |
98d779fbStainless Bot2 years ago | 1267 | async with async_client.beta.threads.runs.with_streaming_response.submit_tool_outputs( |
86379b44Stainless Bot2 years ago | 1268 | "string", |
| 1269 | thread_id="string", | |
| 1270 | tool_outputs=[{}, {}, {}], | |
| 1271 | ) as response: | |
| 1272 | assert not response.is_closed | |
| 1273 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" | |
| 1274 | | |
| 1275 | run = await response.parse() | |
| 1276 | assert_matches_type(Run, run, path=["response"]) | |
| 1277 | | |
| 1278 | assert cast(Any, response.is_closed) is True | |
023a4e66Stainless Bot2 years ago | 1279 | |
| 1280 | @parametrize | |
5429f696Stainless Bot2 years ago | 1281 | async def test_path_params_submit_tool_outputs_overload_1(self, async_client: AsyncOpenAI) -> None: |
| 1282 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `thread_id` but received ''"): | |
| 1283 | await async_client.beta.threads.runs.with_raw_response.submit_tool_outputs( | |
| 1284 | "string", | |
| 1285 | thread_id="", | |
| 1286 | tool_outputs=[{}, {}, {}], | |
| 1287 | ) | |
| 1288 | | |
| 1289 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `run_id` but received ''"): | |
| 1290 | await async_client.beta.threads.runs.with_raw_response.submit_tool_outputs( | |
| 1291 | "", | |
| 1292 | thread_id="string", | |
| 1293 | tool_outputs=[{}, {}, {}], | |
| 1294 | ) | |
| 1295 | | |
| 1296 | @parametrize | |
| 1297 | async def test_method_submit_tool_outputs_overload_2(self, async_client: AsyncOpenAI) -> None: | |
| 1298 | run_stream = await async_client.beta.threads.runs.submit_tool_outputs( | |
| 1299 | "string", | |
| 1300 | thread_id="string", | |
| 1301 | stream=True, | |
| 1302 | tool_outputs=[{}, {}, {}], | |
| 1303 | ) | |
| 1304 | await run_stream.response.aclose() | |
| 1305 | | |
| 1306 | @parametrize | |
| 1307 | async def test_raw_response_submit_tool_outputs_overload_2(self, async_client: AsyncOpenAI) -> None: | |
| 1308 | response = await async_client.beta.threads.runs.with_raw_response.submit_tool_outputs( | |
| 1309 | "string", | |
| 1310 | thread_id="string", | |
| 1311 | stream=True, | |
| 1312 | tool_outputs=[{}, {}, {}], | |
| 1313 | ) | |
| 1314 | | |
| 1315 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" | |
| 1316 | stream = response.parse() | |
| 1317 | await stream.close() | |
| 1318 | | |
| 1319 | @parametrize | |
| 1320 | async def test_streaming_response_submit_tool_outputs_overload_2(self, async_client: AsyncOpenAI) -> None: | |
| 1321 | async with async_client.beta.threads.runs.with_streaming_response.submit_tool_outputs( | |
| 1322 | "string", | |
| 1323 | thread_id="string", | |
| 1324 | stream=True, | |
| 1325 | tool_outputs=[{}, {}, {}], | |
| 1326 | ) as response: | |
| 1327 | assert not response.is_closed | |
| 1328 | assert response.http_request.headers.get("X-Stainless-Lang") == "python" | |
| 1329 | | |
| 1330 | stream = await response.parse() | |
| 1331 | await stream.close() | |
| 1332 | | |
| 1333 | assert cast(Any, response.is_closed) is True | |
| 1334 | | |
| 1335 | @parametrize | |
| 1336 | async def test_path_params_submit_tool_outputs_overload_2(self, async_client: AsyncOpenAI) -> None: | |
023a4e66Stainless Bot2 years ago | 1337 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `thread_id` but received ''"): |
98d779fbStainless Bot2 years ago | 1338 | await async_client.beta.threads.runs.with_raw_response.submit_tool_outputs( |
023a4e66Stainless Bot2 years ago | 1339 | "string", |
| 1340 | thread_id="", | |
5429f696Stainless Bot2 years ago | 1341 | stream=True, |
023a4e66Stainless Bot2 years ago | 1342 | tool_outputs=[{}, {}, {}], |
| 1343 | ) | |
| 1344 | | |
| 1345 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `run_id` but received ''"): | |
98d779fbStainless Bot2 years ago | 1346 | await async_client.beta.threads.runs.with_raw_response.submit_tool_outputs( |
023a4e66Stainless Bot2 years ago | 1347 | "", |
| 1348 | thread_id="string", | |
5429f696Stainless Bot2 years ago | 1349 | stream=True, |
023a4e66Stainless Bot2 years ago | 1350 | tool_outputs=[{}, {}, {}], |
| 1351 | ) |