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

Improve error when knowledgebase is missing a description #839

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

collindutter
Copy link
Member

No description provided.

@collindutter collindutter requested a review from emjay07 June 6, 2024 18:22
Copy link

codecov bot commented Jun 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

vachillo
vachillo previously approved these changes Jun 6, 2024
@@ -52,4 +52,6 @@ def _get_knowledge_base_description(self) -> str:
if "description" in response:
return response["description"]
else:
raise ValueError(f'Error getting Knowledge Base description: {response["message"]}')
raise ValueError(
"No description found for Knowledge Base. Please set a description, or manually set the `GriptapeCloudKnowledgeBaseClient.description` attribute."
Copy link
Member

Choose a reason for hiding this comment

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

maybe throw the id in the message?

Copy link
Member Author

Choose a reason for hiding this comment

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

Does that come back in the response?

Copy link
Member

Choose a reason for hiding this comment

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

not sure, but cant you pull it from self. knowledge_base_id?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh duh

@collindutter collindutter merged commit 30aa370 into dev Jun 6, 2024
12 checks passed
@collindutter collindutter deleted the fix/kb-error branch June 6, 2024 20:01
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