snowflake.cortex.sentiment¶
- snowflake.cortex.sentiment(text: str | Column, session: Session | None = None) float | Column¶
Calls into the LLM inference service to perform sentiment analysis on the input text.
- Parameters:
text – A Column of text strings to send to the LLM.
session – The snowpark session to use. Will be inferred by context if not specified.
- Returns:
A column of floats. 1 represents positive sentiment, -1 represents negative sentiment.