Skip to content

Commit eaa65b6

Browse files
committed
fix: linting
1 parent ad1da4d commit eaa65b6

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

tests/manual_test_async_thread_query.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
file_to_upload_path = "./tests/configs/threads/sample.pdf"
1212

13+
1314
async def main():
1415
print("Step 1: Create Assistant")
1516
assistant = await AsyncAssistants(portkey).create(
@@ -35,7 +36,9 @@ async def main():
3536
print(part)
3637

3738
print("Step 4: Complete the upload")
38-
complete_upload = await AsyncUploads(portkey).complete(upload_id=upload.id, part_ids=[part.id])
39+
complete_upload = await AsyncUploads(portkey).complete(
40+
upload_id=upload.id, part_ids=[part.id]
41+
)
3942
print(complete_upload)
4043

4144
print("Step 5: Create a run and poll")
@@ -61,7 +64,7 @@ async def main():
6164

6265
print("Step 6: Get the list of the messages")
6366
messages = await AsyncMessages(portkey).list(thread_id=run.thread_id)
64-
print(messages)
67+
print(messages)
6568

6669

67-
asyncio.run(main())
70+
asyncio.run(main())

tests/manual_test_batches.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,23 @@
22
from portkey_ai import Portkey
33

44
portkey = Portkey(
5-
api_key="Xgv7++HhSeF70UzdVSsmtJuGYe0=",
6-
virtual_key="portkey-welcome-e248d3"
5+
api_key="Xgv7++HhSeF70UzdVSsmtJuGYe0=", virtual_key="portkey-welcome-e248d3"
76
)
87

98

109
file_name = "./tests/configs/batches/seed_tasks.jsonl"
1110

1211

1312
print("Step 1: Create a batch file")
14-
batch_file = portkey.files.create(
15-
file=open(file_name, "rb"),
16-
purpose="batch"
17-
)
13+
batch_file = portkey.files.create(file=open(file_name, "rb"), purpose="batch")
1814
print(batch_file)
1915

2016

2117
print("Step 2: Create a batch job")
2218
batch_job = portkey.batches.create(
23-
input_file_id=batch_file.id,
24-
endpoint="/v1/chat/completions",
25-
completion_window="24h"
19+
input_file_id=batch_file.id,
20+
endpoint="/v1/chat/completions",
21+
completion_window="24h",
2622
)
2723
print(batch_job)
2824

@@ -34,4 +30,4 @@
3430
print("Step 4: Retrieve the result")
3531
result_file_id = batch_job.output_file_id
3632
result = portkey.files.content(result_file_id).content
37-
print(result)
33+
print(result)

0 commit comments

Comments
 (0)