Skip to content

Commit 4569d98

Browse files
committed
fix lint
1 parent 44ba257 commit 4569d98

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

examples/snowflake_native_app_example.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1+
import snowflake.connector # type: ignore
2+
13
from contextual import ContextualAI
2-
import snowflake.connector
3-
import requests
4-
import base64
5-
import json
64

75
SF_BASE_URL = 'xxxxx-xxxxx-xxxxx.snowflakecomputing.app'
86
BASE_URL = f'https://{SF_BASE_URL}/v1'
97

108
SAMPLE_MESSAGE = 'Can you tell me about XYZ'
119

12-
ctx = snowflake.connector.connect(
10+
ctx = snowflake.connector.connect( # type: ignore
1311
user="",# snowflake account user
1412
password='', # snowflake account password
1513
account="organization-account", # snowflake organization and account <Organization>-<Account>
@@ -18,8 +16,8 @@
1816
})
1917

2018
# Obtain a session token.
21-
token_data = ctx._rest._token_request('ISSUE')
22-
token_extract = token_data['data']['sessionToken']
19+
token_data = ctx._rest._token_request('ISSUE') # type: ignore
20+
token_extract = token_data['data']['sessionToken'] # type: ignore
2321

2422
# Create a request to the ingress endpoint with authz.
2523
api_key = f'\"{token_extract}\"'
@@ -42,8 +40,8 @@
4240
}
4341
]
4442

45-
res = client.agents.query.create(agent.id, messages=messages)
43+
res = client.agents.query.create(agent.id, messages=messages) # type: ignore
4644

47-
output = res.message.content
45+
output = res.message.content # type: ignore
4846

4947
print(output)

0 commit comments

Comments
 (0)