Commit 092a8df7

Stainless Bot <dev+git@stainlessapi.com>
2024-08-13 03:52:09
chore(examples): minor formatting changes (#1644)
1 parent ab57d86
Changed files (6)
tests/api_resources/beta/threads/test_runs.py
@@ -38,8 +38,8 @@ class TestRuns:
             additional_instructions="string",
             additional_messages=[
                 {
-                    "role": "user",
                     "content": "string",
+                    "role": "user",
                     "attachments": [
                         {
                             "file_id": "string",
@@ -69,8 +69,8 @@ class TestRuns:
                     "metadata": {},
                 },
                 {
-                    "role": "user",
                     "content": "string",
+                    "role": "user",
                     "attachments": [
                         {
                             "file_id": "string",
@@ -100,8 +100,8 @@ class TestRuns:
                     "metadata": {},
                 },
                 {
-                    "role": "user",
                     "content": "string",
+                    "role": "user",
                     "attachments": [
                         {
                             "file_id": "string",
@@ -202,8 +202,8 @@ class TestRuns:
             additional_instructions="string",
             additional_messages=[
                 {
-                    "role": "user",
                     "content": "string",
+                    "role": "user",
                     "attachments": [
                         {
                             "file_id": "string",
@@ -233,8 +233,8 @@ class TestRuns:
                     "metadata": {},
                 },
                 {
-                    "role": "user",
                     "content": "string",
+                    "role": "user",
                     "attachments": [
                         {
                             "file_id": "string",
@@ -264,8 +264,8 @@ class TestRuns:
                     "metadata": {},
                 },
                 {
-                    "role": "user",
                     "content": "string",
+                    "role": "user",
                     "attachments": [
                         {
                             "file_id": "string",
@@ -567,16 +567,16 @@ class TestRuns:
             thread_id="string",
             tool_outputs=[
                 {
-                    "tool_call_id": "string",
-                    "output": "string",
+                    "output": "output",
+                    "tool_call_id": "tool_call_id",
                 },
                 {
-                    "tool_call_id": "string",
-                    "output": "string",
+                    "output": "output",
+                    "tool_call_id": "tool_call_id",
                 },
                 {
-                    "tool_call_id": "string",
-                    "output": "string",
+                    "output": "output",
+                    "tool_call_id": "tool_call_id",
                 },
             ],
             stream=False,
@@ -704,8 +704,8 @@ class TestAsyncRuns:
             additional_instructions="string",
             additional_messages=[
                 {
-                    "role": "user",
                     "content": "string",
+                    "role": "user",
                     "attachments": [
                         {
                             "file_id": "string",
@@ -735,8 +735,8 @@ class TestAsyncRuns:
                     "metadata": {},
                 },
                 {
-                    "role": "user",
                     "content": "string",
+                    "role": "user",
                     "attachments": [
                         {
                             "file_id": "string",
@@ -766,8 +766,8 @@ class TestAsyncRuns:
                     "metadata": {},
                 },
                 {
-                    "role": "user",
                     "content": "string",
+                    "role": "user",
                     "attachments": [
                         {
                             "file_id": "string",
@@ -868,8 +868,8 @@ class TestAsyncRuns:
             additional_instructions="string",
             additional_messages=[
                 {
-                    "role": "user",
                     "content": "string",
+                    "role": "user",
                     "attachments": [
                         {
                             "file_id": "string",
@@ -899,8 +899,8 @@ class TestAsyncRuns:
                     "metadata": {},
                 },
                 {
-                    "role": "user",
                     "content": "string",
+                    "role": "user",
                     "attachments": [
                         {
                             "file_id": "string",
@@ -930,8 +930,8 @@ class TestAsyncRuns:
                     "metadata": {},
                 },
                 {
-                    "role": "user",
                     "content": "string",
+                    "role": "user",
                     "attachments": [
                         {
                             "file_id": "string",
@@ -1233,16 +1233,16 @@ class TestAsyncRuns:
             thread_id="string",
             tool_outputs=[
                 {
-                    "tool_call_id": "string",
-                    "output": "string",
+                    "output": "output",
+                    "tool_call_id": "tool_call_id",
                 },
                 {
-                    "tool_call_id": "string",
-                    "output": "string",
+                    "output": "output",
+                    "tool_call_id": "tool_call_id",
                 },
                 {
-                    "tool_call_id": "string",
-                    "output": "string",
+                    "output": "output",
+                    "tool_call_id": "tool_call_id",
                 },
             ],
             stream=False,
tests/api_resources/beta/test_assistants.py
@@ -44,8 +44,8 @@ class TestAssistants:
                     "vector_store_ids": ["string"],
                     "vector_stores": [
                         {
-                            "file_ids": ["string", "string", "string"],
                             "chunking_strategy": {"type": "auto"},
+                            "file_ids": ["string", "string", "string"],
                             "metadata": {},
                         }
                     ],
@@ -276,8 +276,8 @@ class TestAsyncAssistants:
                     "vector_store_ids": ["string"],
                     "vector_stores": [
                         {
-                            "file_ids": ["string", "string", "string"],
                             "chunking_strategy": {"type": "auto"},
+                            "file_ids": ["string", "string", "string"],
                             "metadata": {},
                         }
                     ],
tests/api_resources/beta/test_threads.py
@@ -31,8 +31,8 @@ class TestThreads:
         thread = client.beta.threads.create(
             messages=[
                 {
-                    "role": "user",
                     "content": "string",
+                    "role": "user",
                     "attachments": [
                         {
                             "file_id": "string",
@@ -62,8 +62,8 @@ class TestThreads:
                     "metadata": {},
                 },
                 {
-                    "role": "user",
                     "content": "string",
+                    "role": "user",
                     "attachments": [
                         {
                             "file_id": "string",
@@ -93,8 +93,8 @@ class TestThreads:
                     "metadata": {},
                 },
                 {
-                    "role": "user",
                     "content": "string",
+                    "role": "user",
                     "attachments": [
                         {
                             "file_id": "string",
@@ -131,8 +131,8 @@ class TestThreads:
                     "vector_store_ids": ["string"],
                     "vector_stores": [
                         {
-                            "file_ids": ["string", "string", "string"],
                             "chunking_strategy": {"type": "auto"},
+                            "file_ids": ["string", "string", "string"],
                             "metadata": {},
                         }
                     ],
@@ -310,8 +310,8 @@ class TestThreads:
             thread={
                 "messages": [
                     {
-                        "role": "user",
                         "content": "string",
+                        "role": "user",
                         "attachments": [
                             {
                                 "file_id": "string",
@@ -341,8 +341,8 @@ class TestThreads:
                         "metadata": {},
                     },
                     {
-                        "role": "user",
                         "content": "string",
+                        "role": "user",
                         "attachments": [
                             {
                                 "file_id": "string",
@@ -372,8 +372,8 @@ class TestThreads:
                         "metadata": {},
                     },
                     {
-                        "role": "user",
                         "content": "string",
+                        "role": "user",
                         "attachments": [
                             {
                                 "file_id": "string",
@@ -403,20 +403,20 @@ class TestThreads:
                         "metadata": {},
                     },
                 ],
+                "metadata": {},
                 "tool_resources": {
                     "code_interpreter": {"file_ids": ["string", "string", "string"]},
                     "file_search": {
                         "vector_store_ids": ["string"],
                         "vector_stores": [
                             {
-                                "file_ids": ["string", "string", "string"],
                                 "chunking_strategy": {"type": "auto"},
+                                "file_ids": ["string", "string", "string"],
                                 "metadata": {},
                             }
                         ],
                     },
                 },
-                "metadata": {},
             },
             tool_choice="none",
             tool_resources={
@@ -480,8 +480,8 @@ class TestThreads:
             thread={
                 "messages": [
                     {
-                        "role": "user",
                         "content": "string",
+                        "role": "user",
                         "attachments": [
                             {
                                 "file_id": "string",
@@ -511,8 +511,8 @@ class TestThreads:
                         "metadata": {},
                     },
                     {
-                        "role": "user",
                         "content": "string",
+                        "role": "user",
                         "attachments": [
                             {
                                 "file_id": "string",
@@ -542,8 +542,8 @@ class TestThreads:
                         "metadata": {},
                     },
                     {
-                        "role": "user",
                         "content": "string",
+                        "role": "user",
                         "attachments": [
                             {
                                 "file_id": "string",
@@ -573,20 +573,20 @@ class TestThreads:
                         "metadata": {},
                     },
                 ],
+                "metadata": {},
                 "tool_resources": {
                     "code_interpreter": {"file_ids": ["string", "string", "string"]},
                     "file_search": {
                         "vector_store_ids": ["string"],
                         "vector_stores": [
                             {
-                                "file_ids": ["string", "string", "string"],
                                 "chunking_strategy": {"type": "auto"},
+                                "file_ids": ["string", "string", "string"],
                                 "metadata": {},
                             }
                         ],
                     },
                 },
-                "metadata": {},
             },
             tool_choice="none",
             tool_resources={
@@ -641,8 +641,8 @@ class TestAsyncThreads:
         thread = await async_client.beta.threads.create(
             messages=[
                 {
-                    "role": "user",
                     "content": "string",
+                    "role": "user",
                     "attachments": [
                         {
                             "file_id": "string",
@@ -672,8 +672,8 @@ class TestAsyncThreads:
                     "metadata": {},
                 },
                 {
-                    "role": "user",
                     "content": "string",
+                    "role": "user",
                     "attachments": [
                         {
                             "file_id": "string",
@@ -703,8 +703,8 @@ class TestAsyncThreads:
                     "metadata": {},
                 },
                 {
-                    "role": "user",
                     "content": "string",
+                    "role": "user",
                     "attachments": [
                         {
                             "file_id": "string",
@@ -741,8 +741,8 @@ class TestAsyncThreads:
                     "vector_store_ids": ["string"],
                     "vector_stores": [
                         {
-                            "file_ids": ["string", "string", "string"],
                             "chunking_strategy": {"type": "auto"},
+                            "file_ids": ["string", "string", "string"],
                             "metadata": {},
                         }
                     ],
@@ -920,8 +920,8 @@ class TestAsyncThreads:
             thread={
                 "messages": [
                     {
-                        "role": "user",
                         "content": "string",
+                        "role": "user",
                         "attachments": [
                             {
                                 "file_id": "string",
@@ -951,8 +951,8 @@ class TestAsyncThreads:
                         "metadata": {},
                     },
                     {
-                        "role": "user",
                         "content": "string",
+                        "role": "user",
                         "attachments": [
                             {
                                 "file_id": "string",
@@ -982,8 +982,8 @@ class TestAsyncThreads:
                         "metadata": {},
                     },
                     {
-                        "role": "user",
                         "content": "string",
+                        "role": "user",
                         "attachments": [
                             {
                                 "file_id": "string",
@@ -1013,20 +1013,20 @@ class TestAsyncThreads:
                         "metadata": {},
                     },
                 ],
+                "metadata": {},
                 "tool_resources": {
                     "code_interpreter": {"file_ids": ["string", "string", "string"]},
                     "file_search": {
                         "vector_store_ids": ["string"],
                         "vector_stores": [
                             {
-                                "file_ids": ["string", "string", "string"],
                                 "chunking_strategy": {"type": "auto"},
+                                "file_ids": ["string", "string", "string"],
                                 "metadata": {},
                             }
                         ],
                     },
                 },
-                "metadata": {},
             },
             tool_choice="none",
             tool_resources={
@@ -1090,8 +1090,8 @@ class TestAsyncThreads:
             thread={
                 "messages": [
                     {
-                        "role": "user",
                         "content": "string",
+                        "role": "user",
                         "attachments": [
                             {
                                 "file_id": "string",
@@ -1121,8 +1121,8 @@ class TestAsyncThreads:
                         "metadata": {},
                     },
                     {
-                        "role": "user",
                         "content": "string",
+                        "role": "user",
                         "attachments": [
                             {
                                 "file_id": "string",
@@ -1152,8 +1152,8 @@ class TestAsyncThreads:
                         "metadata": {},
                     },
                     {
-                        "role": "user",
                         "content": "string",
+                        "role": "user",
                         "attachments": [
                             {
                                 "file_id": "string",
@@ -1183,20 +1183,20 @@ class TestAsyncThreads:
                         "metadata": {},
                     },
                 ],
+                "metadata": {},
                 "tool_resources": {
                     "code_interpreter": {"file_ids": ["string", "string", "string"]},
                     "file_search": {
                         "vector_store_ids": ["string"],
                         "vector_stores": [
                             {
-                                "file_ids": ["string", "string", "string"],
                                 "chunking_strategy": {"type": "auto"},
+                                "file_ids": ["string", "string", "string"],
                                 "metadata": {},
                             }
                         ],
                     },
                 },
-                "metadata": {},
             },
             tool_choice="none",
             tool_resources={
tests/api_resources/chat/test_completions.py
@@ -48,8 +48,8 @@ class TestCompletions:
             function_call="none",
             functions=[
                 {
-                    "description": "string",
-                    "name": "string",
+                    "name": "name",
+                    "description": "description",
                     "parameters": {"foo": "bar"},
                 }
             ],
@@ -69,31 +69,31 @@ class TestCompletions:
             tool_choice="none",
             tools=[
                 {
-                    "type": "function",
                     "function": {
-                        "description": "string",
-                        "name": "string",
+                        "name": "name",
+                        "description": "description",
                         "parameters": {"foo": "bar"},
                         "strict": True,
                     },
+                    "type": "function",
                 },
                 {
-                    "type": "function",
                     "function": {
-                        "description": "string",
-                        "name": "string",
+                        "name": "name",
+                        "description": "description",
                         "parameters": {"foo": "bar"},
                         "strict": True,
                     },
+                    "type": "function",
                 },
                 {
-                    "type": "function",
                     "function": {
-                        "description": "string",
-                        "name": "string",
+                        "name": "name",
+                        "description": "description",
                         "parameters": {"foo": "bar"},
                         "strict": True,
                     },
+                    "type": "function",
                 },
             ],
             top_logprobs=0,
@@ -168,8 +168,8 @@ class TestCompletions:
             function_call="none",
             functions=[
                 {
-                    "description": "string",
-                    "name": "string",
+                    "name": "name",
+                    "description": "description",
                     "parameters": {"foo": "bar"},
                 }
             ],
@@ -188,31 +188,31 @@ class TestCompletions:
             tool_choice="none",
             tools=[
                 {
-                    "type": "function",
                     "function": {
-                        "description": "string",
-                        "name": "string",
+                        "name": "name",
+                        "description": "description",
                         "parameters": {"foo": "bar"},
                         "strict": True,
                     },
+                    "type": "function",
                 },
                 {
-                    "type": "function",
                     "function": {
-                        "description": "string",
-                        "name": "string",
+                        "name": "name",
+                        "description": "description",
                         "parameters": {"foo": "bar"},
                         "strict": True,
                     },
+                    "type": "function",
                 },
                 {
-                    "type": "function",
                     "function": {
-                        "description": "string",
-                        "name": "string",
+                        "name": "name",
+                        "description": "description",
                         "parameters": {"foo": "bar"},
                         "strict": True,
                     },
+                    "type": "function",
                 },
             ],
             top_logprobs=0,
@@ -307,8 +307,8 @@ class TestAsyncCompletions:
             function_call="none",
             functions=[
                 {
-                    "description": "string",
-                    "name": "string",
+                    "name": "name",
+                    "description": "description",
                     "parameters": {"foo": "bar"},
                 }
             ],
@@ -328,31 +328,31 @@ class TestAsyncCompletions:
             tool_choice="none",
             tools=[
                 {
-                    "type": "function",
                     "function": {
-                        "description": "string",
-                        "name": "string",
+                        "name": "name",
+                        "description": "description",
                         "parameters": {"foo": "bar"},
                         "strict": True,
                     },
+                    "type": "function",
                 },
                 {
-                    "type": "function",
                     "function": {
-                        "description": "string",
-                        "name": "string",
+                        "name": "name",
+                        "description": "description",
                         "parameters": {"foo": "bar"},
                         "strict": True,
                     },
+                    "type": "function",
                 },
                 {
-                    "type": "function",
                     "function": {
-                        "description": "string",
-                        "name": "string",
+                        "name": "name",
+                        "description": "description",
                         "parameters": {"foo": "bar"},
                         "strict": True,
                     },
+                    "type": "function",
                 },
             ],
             top_logprobs=0,
@@ -427,8 +427,8 @@ class TestAsyncCompletions:
             function_call="none",
             functions=[
                 {
-                    "description": "string",
-                    "name": "string",
+                    "name": "name",
+                    "description": "description",
                     "parameters": {"foo": "bar"},
                 }
             ],
@@ -447,31 +447,31 @@ class TestAsyncCompletions:
             tool_choice="none",
             tools=[
                 {
-                    "type": "function",
                     "function": {
-                        "description": "string",
-                        "name": "string",
+                        "name": "name",
+                        "description": "description",
                         "parameters": {"foo": "bar"},
                         "strict": True,
                     },
+                    "type": "function",
                 },
                 {
-                    "type": "function",
                     "function": {
-                        "description": "string",
-                        "name": "string",
+                        "name": "name",
+                        "description": "description",
                         "parameters": {"foo": "bar"},
                         "strict": True,
                     },
+                    "type": "function",
                 },
                 {
-                    "type": "function",
                     "function": {
-                        "description": "string",
-                        "name": "string",
+                        "name": "name",
+                        "description": "description",
                         "parameters": {"foo": "bar"},
                         "strict": True,
                     },
+                    "type": "function",
                 },
             ],
             top_logprobs=0,
tests/api_resources/fine_tuning/test_jobs.py
@@ -44,8 +44,8 @@ class TestJobs:
                     "type": "wandb",
                     "wandb": {
                         "project": "my-wandb-project",
-                        "name": "string",
-                        "entity": "string",
+                        "entity": "entity",
+                        "name": "name",
                         "tags": ["custom-tag", "custom-tag", "custom-tag"],
                     },
                 },
@@ -53,8 +53,8 @@ class TestJobs:
                     "type": "wandb",
                     "wandb": {
                         "project": "my-wandb-project",
-                        "name": "string",
-                        "entity": "string",
+                        "entity": "entity",
+                        "name": "name",
                         "tags": ["custom-tag", "custom-tag", "custom-tag"],
                     },
                 },
@@ -62,8 +62,8 @@ class TestJobs:
                     "type": "wandb",
                     "wandb": {
                         "project": "my-wandb-project",
-                        "name": "string",
-                        "entity": "string",
+                        "entity": "entity",
+                        "name": "name",
                         "tags": ["custom-tag", "custom-tag", "custom-tag"],
                     },
                 },
@@ -283,8 +283,8 @@ class TestAsyncJobs:
                     "type": "wandb",
                     "wandb": {
                         "project": "my-wandb-project",
-                        "name": "string",
-                        "entity": "string",
+                        "entity": "entity",
+                        "name": "name",
                         "tags": ["custom-tag", "custom-tag", "custom-tag"],
                     },
                 },
@@ -292,8 +292,8 @@ class TestAsyncJobs:
                     "type": "wandb",
                     "wandb": {
                         "project": "my-wandb-project",
-                        "name": "string",
-                        "entity": "string",
+                        "entity": "entity",
+                        "name": "name",
                         "tags": ["custom-tag", "custom-tag", "custom-tag"],
                     },
                 },
@@ -301,8 +301,8 @@ class TestAsyncJobs:
                     "type": "wandb",
                     "wandb": {
                         "project": "my-wandb-project",
-                        "name": "string",
-                        "entity": "string",
+                        "entity": "entity",
+                        "name": "name",
                         "tags": ["custom-tag", "custom-tag", "custom-tag"],
                     },
                 },
tests/api_resources/test_images.py
@@ -31,7 +31,7 @@ class TestImages:
             model="dall-e-2",
             n=1,
             response_format="url",
-            size="1024x1024",
+            size="256x256",
             user="user-1234",
         )
         assert_matches_type(ImagesResponse, image, path=["response"])
@@ -77,7 +77,7 @@ class TestImages:
             model="dall-e-2",
             n=1,
             response_format="url",
-            size="1024x1024",
+            size="256x256",
             user="user-1234",
         )
         assert_matches_type(ImagesResponse, image, path=["response"])
@@ -123,7 +123,7 @@ class TestImages:
             n=1,
             quality="standard",
             response_format="url",
-            size="1024x1024",
+            size="256x256",
             style="vivid",
             user="user-1234",
         )
@@ -171,7 +171,7 @@ class TestAsyncImages:
             model="dall-e-2",
             n=1,
             response_format="url",
-            size="1024x1024",
+            size="256x256",
             user="user-1234",
         )
         assert_matches_type(ImagesResponse, image, path=["response"])
@@ -217,7 +217,7 @@ class TestAsyncImages:
             model="dall-e-2",
             n=1,
             response_format="url",
-            size="1024x1024",
+            size="256x256",
             user="user-1234",
         )
         assert_matches_type(ImagesResponse, image, path=["response"])
@@ -263,7 +263,7 @@ class TestAsyncImages:
             n=1,
             quality="standard",
             response_format="url",
-            size="1024x1024",
+            size="256x256",
             style="vivid",
             user="user-1234",
         )