Skip to content

Commit 3f78d3e

Browse files
committed
print in test
1 parent e10e6d4 commit 3f78d3e

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

client/tests/astra-assistants/test_streaming_run_retrieval_v2.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
import json
22

33
import pytest
4-
import logging
54
import time
65

76
from openai.lib.streaming import AssistantEventHandler
87
from typing_extensions import override
98

10-
logger = logging.getLogger(__name__)
11-
129
def run_with_assistant(assistant, client):
13-
logger.info(f"using assistant: {assistant}")
14-
logger.info("Uploading file:")
10+
print(f"using assistant: {assistant}")
11+
print("Uploading file:")
1512
# Upload the file
1613
file = client.files.create(
1714
file=open(
@@ -48,21 +45,21 @@ def run_with_assistant(assistant, client):
4845
#print(file_batch.file_counts)
4946

5047

51-
logger.info("adding vector_store id to assistant")
48+
print("adding vector_store id to assistant")
5249
# Update Assistant
5350
assistant = client.beta.assistants.update(
5451
assistant.id,
5552
tools=[{"type": "file_search"}],
5653
tool_resources={"file_search": {"vector_store_ids": [vector_store.id]}},
5754
)
58-
logger.info(f"updated assistant: {assistant}")
55+
print(f"updated assistant: {assistant}")
5956
user_message = "What are some cool math concepts behind this ML paper pdf? Explain in two sentences."
60-
logger.info("creating persistent thread and message")
57+
print("creating persistent thread and message")
6158
thread = client.beta.threads.create()
6259
client.beta.threads.messages.create(
6360
thread_id=thread.id, role="user", content=user_message
6461
)
65-
logger.info(f"> {user_message}")
62+
print(f"> {user_message}")
6663

6764
class EventHandler(AssistantEventHandler):
6865
def __init__(self):
@@ -93,7 +90,7 @@ def on_text_delta(self, delta, snapshot):
9390

9491
event_handler = EventHandler()
9592

96-
logger.info(f"creating run")
93+
print(f"creating run")
9794
with client.beta.threads.runs.create_and_stream(
9895
thread_id=thread.id,
9996
assistant_id=assistant.id,

0 commit comments

Comments
 (0)