Black Friday Reward - Upto 75% off - Ends in 0d 00h 00m 00s - Coupon code: CFsave75

Snowflake SnowPro Specialty: Gen AI Exam GES-C02 Question # 20 Topic 3 Discussion

Snowflake SnowPro Specialty: Gen AI Exam GES-C02 Question # 20 Topic 3 Discussion

GES-C02 Exam Topic 3 Question 20 Discussion:
Question #: 20
Topic #: 3

A Gen AI Specialist is developing a Streamlit chatbot that uses `snowflake.cortex.complete` to answer user questions with this script:

```python

import streamlit as st

import snowflake.cortex

from snowflake.cortex import CompleteOptions

if prompt := st.chat_input("How can I help you?"):

with st.chat_message(name="User"):

st.write(prompt)

with st.chat_message("assistant"):

response = snowflake.cortex.complete(

"claude-3-5-sonnet",

[dict(role="user", content=prompt)],

)

```

Which parameter should be added to the script so responses display incrementally in small chunks as they are generated?


A.

deadline=5


B.

stream=True


C.

options=CompleteOptions(max_tokens=5)


D.

options=CompleteOptions(response_format="incremental")


Get Premium GES-C02 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.