Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Dec 6, 2024

Conversation

sfc-gh-alherrera
Copy link
Collaborator

…g logs cleanup


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
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
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
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
2 checks passed
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