Skip to content

Commit 1f735bd

Browse files
authored
Fix ai_complete test (#3612)
1 parent 506ae14 commit 1f735bd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/snowflake/snowpark/functions.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12742,24 +12742,24 @@ def ai_complete(
1274212742
... }
1274312743
>>> df = session.range(1).select(
1274412744
... ai_complete(
12745-
... model='mistral-large2',
12745+
... model='llama2-70b-chat',
1274612746
... prompt='Analyze the sentiment of this text: I love this product!',
1274712747
... response_format=response_schema
1274812748
... ).alias("structured_result")
1274912749
... )
12750-
>>> result = df.collect()[0][0] # doctest: +SKIP
12751-
>>> 'sentiment' in result and 'confidence' in result # doctest: +SKIP
12750+
>>> result = df.collect()[0][0]
12751+
>>> 'sentiment' in result and 'confidence' in result
1275212752
True
1275312753
1275412754
>>> # Using prompt object from prompt() function
1275512755
>>> df = session.range(1).select(
1275612756
... ai_complete(
12757-
... model='openai-gpt-4.1',
12757+
... model='claude-3-7-sonnet',
1275812758
... prompt=prompt("Extract the kitchen appliances identified in this image. Respond in JSON only with the identified appliances? {0}", to_file('@mystage/kitchen.png')),
1275912759
... )
1276012760
... )
12761-
>>> result = df.collect()[0][0] # doctest: +SKIP
12762-
>>> "microwave" in result and "refrigerator" in result # doctest: +SKIP
12761+
>>> result = df.collect()[0][0]
12762+
>>> "microwave" in result and "refrigerator" in result
1276312763
True
1276412764
"""
1276512765
sql_func_name = "ai_complete"

0 commit comments

Comments
 (0)