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

entity details #1158

Merged
merged 19 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion superagi/apm/knowledge_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ def get_knowledge_events_by_name(self, knowledge_name: str) -> List[Dict[str, Un
'agent_execution_name': row.agent_execution_name,
'agent_name': row.agent_name,
'model': row.model
} for row in result]
} for row in result]
4 changes: 2 additions & 2 deletions superagi/controllers/analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def get_knowledge_logs(knowledge_name: str, organisation=Depends(get_user_organi
try:
return KnowledgeHandler(session=db.session, organisation_id=organisation.id).get_knowledge_events_by_name(knowledge_name)
except Exception as e:
logging.error(f"Error while getting knoelwdge event details: {str(e)}")
logging.error(f"Error while getting knowledge event details: {str(e)}")
if hasattr(e, 'status_code'):
raise HTTPException(status_code=e.status_code, detail=e.detail)
else:
raise HTTPException(status_code=500, detail="Internal Server Error")
raise HTTPException(status_code=500, detail="Internal Server Error")
1 change: 0 additions & 1 deletion tests/unit_tests/apm/test_knowledge_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ def test_get_knowledge_events_by_name_knowledge_not_found(knowledge_handler, moc
not_found_message = 'Knowledge not found'

mock_session.query().filter_by().filter().first.return_value = None

try:
knowledge_handler.get_knowledge_events_by_name(knowledge_name)
assert False, "Expected HTTPException has not been raised"
Expand Down