🎈 The 30 Days of AI challenge starts today!

I’ve just found a little bug in Day 20 (I think) - posting it here so you can fix it up if I’m right:

# Try to get available services
try:
services_result = session.sql("SHOW CORTEX SEARCH SERVICES").collect()
available_services = [f"{row['database_name']}.{row['schema_name']}.{row['name']}"
for row in services_result] if services_result else []
except:
available_services = []

# Ensure default service is always first
if default_service in available_services:
available_services.remove(default_service)
available_services.insert(0, default_service)

I think the command needed to pull in all search services is either:

SHOW CORTEX SEARCH SERVICES IN SCHEMA db.schema or

SHOW CORTEX SEARCH SERVICES IN ACCOUNT

Whereas SHOW CORTEX SEARCH SERVICES just returns an empty list (which is later filled by the default when you use available_services.insert(0, default_service))

Thanks again for putting this all together @dataprofessor - I’m learning so much!

I just published my deep dive blog exploring everything from Week 3 in detail, check it out here:

https://mediu m.com/kieran_adair/building-a-rag-powered-chatbot-with-streamlit-snowflake-30-days-of-ai-challenge-week-3-992feb8e442c