Skip to content

docs: guard empty choices in Text to SQL streaming example - #283

Open
k1epg01ng129-eng wants to merge 1 commit into
Chainlit:mainfrom
k1epg01ng129-eng:fix/openai-sql-empty-stream-choice
Open

k1epg01ng129-eng wants to merge 1 commit into
Chainlit:mainfrom
k1epg01ng129-eng:fix/openai-sql-empty-stream-choice

Conversation

@k1epg01ng129-eng

Copy link
Copy Markdown

Fixes #261

Guard the Text to SQL example before accessing the first streamed choice. A chunk with empty choices otherwise raises IndexError; normal text chunks still stream unchanged.

Verification: an isolated Python check covered empty choices, null content, and a normal text token; git diff --check passed.

AI assistance: Codex prepared the one-line change and isolated check.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue on docs: "Text to SQL" example crashes without array check

1 participant