Installation and setup
We start by installing thesnowflake-snowpark-python
library, using the command below. Then we configure the credentials for connecting to Snowflake, as environment variables or pass them directly.
Calling the chat model
We can now call the chat model using theinvoke
or stream
methods.
messages = [
SystemMessage(content=“You are a friendly assistant.”),
HumanMessage(content=“What are large language models?”),
]
chat.invoke(messages)