Skip to content

Commit 8bb3b2d

Browse files
committed
update
1 parent a4152a8 commit 8bb3b2d

File tree

4 files changed

+3
-40
lines changed

4 files changed

+3
-40
lines changed

Diff for: backend/onyx/server/documents/connector.py

-4
Original file line numberDiff line numberDiff line change
@@ -845,10 +845,6 @@ def create_connector_from_model(
845845
db_session: Session = Depends(get_session),
846846
) -> ObjectCreationIdResponse:
847847
tenant_id = get_current_tenant_id()
848-
print("Creating connector from model")
849-
print("connector_data: ", connector_data)
850-
print(connector_data.connector_specific_config)
851-
print(connector_data.connector_specific_config)
852848

853849
try:
854850
_validate_connector_allowed(connector_data.source)

Diff for: backend/tests/integration/common_utils/connectors.py

+1-12
Original file line numberDiff line numberDiff line change
@@ -37,33 +37,22 @@ def upload_file(
3737
if "Content-Type" in headers:
3838
del headers["Content-Type"]
3939

40-
# Print debug info
41-
print(f"Uploading file: {file_path} with name: {file_name}")
42-
print(f"Headers: {headers}")
43-
4440
# Make the request
4541
response = requests.post(
4642
f"{API_SERVER_URL}/manage/admin/connector/file/upload",
4743
files=files,
4844
headers=headers,
4945
)
5046

51-
# Print detailed response for debugging
52-
print(f"Response status: {response.status_code}")
53-
print(f"Response text: {response.text}")
54-
5547
if not response.ok:
5648
try:
5749
error_detail = response.json().get("detail", "Unknown error")
58-
print(f"Error detail: {error_detail}")
59-
except Exception as e:
50+
except Exception:
6051
error_detail = response.text
61-
print(f"Failed to parse error as JSON: {e}")
6252

6353
raise Exception(
6454
f"Unable to upload files - {error_detail} (Status code: {response.status_code})"
6555
)
6656

6757
response_json = response.json()
68-
print(f"Response JSON: {response_json}")
6958
return response_json

Diff for: backend/tests/integration/common_utils/managers/settings.py

-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ def update_settings(
5555
)
5656

5757
if not response.ok:
58-
print("Failed to update settings")
59-
print(response.json())
6058
return (
6159
{},
6260
f"Failed to update settings - {response.json().get('detail', 'Unknown error')}",

Diff for: backend/tests/integration/tests/image_indexing/indexing_images.py

+2-22
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ def test_image_indexing(reset: None) -> None:
2929
test_file_dir = "tests/integration/common_utils/test_data"
3030
os.makedirs(test_file_dir, exist_ok=True)
3131
test_file_path = os.path.join(test_file_dir, "sample.pdf")
32-
print(f"Using test file: {test_file_path}")
3332

3433
# Use our fixed upload_file function to upload the test file
3534
file_name = "sample.pdf"
@@ -41,15 +40,14 @@ def test_image_indexing(reset: None) -> None:
4140
name="test_llm",
4241
user_performing_action=admin_user,
4342
)
44-
print("Created LLM provider")
43+
4544
SettingsManager.update_settings(
4645
DATestSettings(
4746
search_time_image_analysis_enabled=True,
4847
image_extraction_and_analysis_enabled=True,
4948
)
5049
)
5150

52-
print(f"File upload response: {upload_response}")
5351
file_paths = upload_response.get("file_paths", [])
5452

5553
if not file_paths:
@@ -62,11 +60,6 @@ def test_image_indexing(reset: None) -> None:
6260
user_performing_action=admin_user,
6361
)
6462

65-
print("Created credential")
66-
67-
print("Creating connector")
68-
print("file_paths: ", file_paths)
69-
print({"file_locations": file_paths})
7063
# Create the connector
7164
connector_name = f"FileConnector-{int(datetime.now().timestamp())}"
7265
connector = ConnectorManager.create(
@@ -79,8 +72,6 @@ def test_image_indexing(reset: None) -> None:
7972
user_performing_action=admin_user,
8073
)
8174

82-
print(f"Created connector with ID: {connector.id}")
83-
8475
# Link the credential to the connector
8576
cc_pair = CCPairManager.create(
8677
credential_id=credential.id,
@@ -89,8 +80,6 @@ def test_image_indexing(reset: None) -> None:
8980
user_performing_action=admin_user,
9081
)
9182

92-
print(f"Created CC pair with ID: {cc_pair.id}")
93-
9483
# Explicitly run the connector to start indexing
9584
CCPairManager.run_once(
9685
cc_pair=cc_pair,
@@ -103,25 +92,16 @@ def test_image_indexing(reset: None) -> None:
10392
user_performing_action=admin_user,
10493
)
10594

106-
print("Started indexing")
107-
108-
# Give the system some time to index the document
109-
print("Sleeping for 15 seconds to allow indexing to progress...")
110-
11195
# Create a chat session and ask about dogs
112-
print("Creating chat session to ask about dogs...")
11396
chat_session: DATestChatSession = ChatSessionManager.create(
11497
user_performing_action=admin_user
11598
)
11699

117100
# Ask about dogs in the document
118-
response = ChatSessionManager.send_message(
101+
ChatSessionManager.send_message(
119102
chat_session_id=chat_session.id,
120103
message="How many dogs?",
121104
user_performing_action=admin_user,
122105
)
123106

124-
print(f"Response to 'How many dogs?': {response}")
125-
126107
# Test passed if we were able to complete the workflow
127-
print("Test successful - file uploaded and chat query completed")

0 commit comments

Comments
 (0)