Snowflake LLM - IndexError: list index out of range

I am trying to replicate the Frosty app on my local PC using Streamlit.

However, when I run the Python script, I get below error:

File “C:\Users.…\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\runtime\scriptrunner\”, line 534, in _run_script
exec(code, module.dict)
File “C:.…\”, line 58, in
response += delta.choices[0].delta.get(“content”, “”)
IndexError: list index out of range

What could be the reason?

You can refer the code:


Hi @ramani-venkat,

We’re in the process of updating that quickstart given the recent OpenAI changes – for now, you can either use openai version < 1.0.0 or use the updated code for versions 1.0.0 and up that’s available here.

1 Like

Thanks for flagging the issue! We have a PR out to update a similar tutorial in the Streamlit documentation as well.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.