Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Snowflake AI connector and SP #1206

Merged
merged 2 commits into from
Feb 19, 2024
Merged

New Snowflake AI connector and SP #1206

merged 2 commits into from
Feb 19, 2024

Conversation

sid-swirl
Copy link
Contributor

Branching Reminders

X For core code changes, create a branch off develop

  • For product documentation changes, create a branch off main
  • Always name your branch in a way that clearly describes your proposed changes

Description

New SnowflakeAI connector, similar to ChatGPT
New SnowflakeAI SP
Added SnowflakeAI connector to connector init
Added SnowflakeAI connector to model CHOICES

Related Issue(s)

DS-1706

Testing and Validation

I cannot test the execute_search part of the connector
I tested normalize_response() assuming it gets the expected input:

>>> r = " Based on the context, the question is asking about a table in UDH that gets data from SAP MDG. The answer is MDG_GLOBAL_MATERIAL. This table contains the primary data for Global ID attributes, and it is sourced from SAP MDG. The link to other ECC tables will be through a column called GLOBAL_MATERIAL_KEY. For example, in ECC_MATERIAL_MASTER or APO_MATERIAL_MASTER, the column to link in MDG_MATERIAL_ATTRIBUTES will be GLOBAL_ID. \n\nMore information :-https:\/\/teams.microsoft.com\/l\/message\/19:0f3927a64c9d491d804ca117a0419797@thread.tacv2\/1707323078391?tenantId=7a916015-20ae-4ad1-9170-eefd915e9272&groupId=afc7a998-5ac2-41db-9d44-307f96e78751&parentMessageId=1707323078391&teamName=PGS%20UDH%20Community&channelName=Ask%20the%20Community&createdTime=1707323078391"
<console>:1: SyntaxWarning: invalid escape sequence '\/'
>>> 
>>> from swirl.connectors.snowflake_ai import SnowflakeAI
>>> s = SnowflakeAI(51,556,False)
>>> s.response = r
>>> s.query_string_to_provider = "UDH TABLE WHICH GETS DATA FROM SAP MDG?"
>>> 
>>> s.normalize_response()
INFO 2024-02-19 14:09:36,833 snowflake_ai SnowflakeAI_556_51: normalizing...
>>> s.results
[{'url': 'https://teams.microsoft.com/l/message/19:0f3927a64c9d491d804ca117a0419797@thread.tacv2/1707323078391?tenantId=7a916015-20ae-4ad1-9170-eefd915e9272&groupId=afc7a998-5ac2-41db-9d44-307f96e78751&parentMessageId=1707323078391&teamName=PGS%20UDH%20Community&channelName=Ask%20the%20Community&createdTime=170732307839', 'title': 'UDH TABLE WHICH GETS DATA FROM SAP MDG?', 'body': 'Based on the context, the question is asking about a table in UDH that gets data from SAP MDG. The answer is MDG_GLOBAL_MATERIAL. This table contains the primary data for Global ID attributes, and it is sourced from SAP MDG. The link to other ECC tables will be through a column called GLOBAL_MATERIAL_KEY. For example, in ECC_MATERIAL_MASTER or APO_MATERIAL_MASTER, the column to link in MDG_MATERIAL_ATTRIBUTES will be GLOBAL_ID.', 'author': 'Snowflake AI', 'date_published': '2024-02-19 14:09:36.834415'}]

Type of Change

  • Bug fix or other non-breaking change that addresses an issue
  • New Feature / Enhancement (non-breaking change that add or improves functionality)
  • New Feature (breaking change that is not backwards compatible and/or alters current functionality)
  • Documentation (change to product documentation or README.md only)

Includes connector init and model CHOICES DS-1706
@dnicodemus dnicodemus merged commit 1318f21 into develop Feb 19, 2024
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants