Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/snowflake/snowpark/dataframe_ai_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def complete(
... prompt="Answer this question briefly: {q}",
... input_columns={"q": col("question")},
... output_column="answer",
... model="snowflake-arctic"
... model="llama3.1-8b"
... )
>>> result_df.columns
['QUESTION', 'ANSWER']
Expand Down
4 changes: 2 additions & 2 deletions src/snowflake/snowpark/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -13690,7 +13690,7 @@ def ai_complete(

>>> # Basic completion with string prompt
>>> df = session.range(1).select(
... ai_complete('snowflake-arctic', 'What are large language models?').alias("response")
... ai_complete('llama3.1-8b', 'What are large language models?').alias("response")
... )
>>> len(df.collect()[0][0]) > 10
True
Expand Down Expand Up @@ -13762,7 +13762,7 @@ def ai_complete(
>>> # Using prompt object from prompt() function
>>> df = session.range(1).select(
... ai_complete(
... model='claude-3-7-sonnet',
... model='claude-4-sonnet',
... prompt=prompt("Extract the kitchen appliances identified in this image. Respond in JSON only with the identified appliances? {0}", to_file('@mystage/kitchen.png')),
... )
... )
Expand Down
6 changes: 3 additions & 3 deletions tests/integ/test_dataframe_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_dataframe_ai_complete_with_named_placeholders(session):
"category": col("category"),
},
output_column="sentiment_analysis",
model="snowflake-arctic",
model="llama3.1-8b",
)

# Check schema
Expand Down Expand Up @@ -96,7 +96,7 @@ def test_dataframe_ai_complete_default_output_column(session):
result_df = df.ai.complete(
prompt="Answer the question",
input_columns=[col("question")],
model="snowflake-arctic",
model="llama3.1-8b",
model_parameters={
"temperature": 0.8,
"top_p": 0.95,
Expand Down Expand Up @@ -135,7 +135,7 @@ def test_dataframe_ai_complete_error_handling(session):
df.ai.complete(
prompt="Test",
input_columns="invalid", # Should be list or dict
model="snowflake-arctic",
model="llama3.1-8b",
)


Expand Down
4 changes: 4 additions & 0 deletions tests/integ/test_stored_procedure.py
Original file line number Diff line number Diff line change
Expand Up @@ -2254,6 +2254,10 @@ def proc_function(session_: Session) -> str:
)


@pytest.mark.skipif(
"FIPS_TEST" in os.environ,
reason="SNOW-3425553: need FIPS mode investigation",
)
@pytest.mark.skipif(
IS_IN_STORED_PROC, reason="use schema is not allowed in stored proc (owner mode)"
)
Expand Down
Loading