Skip to content

fix: refactoring parser to address long response bugs and debug log cleanups#79

Merged
sfc-gh-alherrera merged 4 commits intomainfrom
error-logging
Dec 6, 2024
Merged

fix: refactoring parser to address long response bugs and debug log cleanups#79
sfc-gh-alherrera merged 4 commits intomainfrom
error-logging

Conversation

@sfc-gh-alherrera
Copy link
Copy Markdown
Collaborator

…g logs cleanup

Co-authored-by: Tyler White <tyler.white@snowflake.com>
if "choices" not in response_text:
raise AgentGatewayError(
message=f"Failed Cortex LLM Request. Missing choices in response. See details:{response_text}"
message=f"Invalid Cortex LLM Response. See details:{response_text}"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the possibilities here?

Would it only hit this block in the case of Analyst not returning either the text response with suggestions or an SQL expression?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is for the complete calls, not analyst. there can be cases where complete is not configured properly (invalid model provided by end user..etc) or the response comes back empty

Copy link
Copy Markdown
Collaborator

@sfc-gh-twhite sfc-gh-twhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Small comment regarding clarity (maybe we can add some comments about why we're inside that "if choices not in" section) - but not a blocker.

@sfc-gh-alherrera sfc-gh-alherrera merged commit 8cc8e57 into main Dec 6, 2024
@sfc-gh-twhite sfc-gh-twhite deleted the error-logging branch January 23, 2025 19:50
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.

2 participants