From 74279986785afb5595e76dbdf1e968f4aeae0d47 Mon Sep 17 00:00:00 2001 From: abhijeet Date: Fri, 28 Jul 2023 12:44:52 +0530 Subject: [PATCH 1/5] Updated --- superagi/controllers/knowledges.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superagi/controllers/knowledges.py b/superagi/controllers/knowledges.py index 3afac761f..a402e392f 100644 --- a/superagi/controllers/knowledges.py +++ b/superagi/controllers/knowledges.py @@ -56,7 +56,7 @@ def get_marketplace_knowledge_list(page: int = 0): @router.get("/user/list") def get_user_knowledge_list(organisation = Depends(get_user_organisation)): - marketplace_knowledges = Knowledges.fetch_marketplace_list(page=-1) + marketplace_knowledges = Knowledges.fetch_marketplace_list(page=0) user_knowledge_list = Knowledges.get_organisation_knowledges(db.session, organisation) for user_knowledge in user_knowledge_list: if user_knowledge["name"] in [knowledge.name for knowledge in marketplace_knowledges]: From bc3c20213447c389d4ddb9a823eb246d612d0368 Mon Sep 17 00:00:00 2001 From: abhijeet Date: Fri, 28 Jul 2023 12:49:31 +0530 Subject: [PATCH 2/5] handled page number --- superagi/controllers/knowledges.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/superagi/controllers/knowledges.py b/superagi/controllers/knowledges.py index a402e392f..b1900238b 100644 --- a/superagi/controllers/knowledges.py +++ b/superagi/controllers/knowledges.py @@ -32,7 +32,8 @@ def get_knowledge_list( dict: The response containing the marketplace list. """ - + if page < 0: + page = 0 marketplace_knowledges = Knowledges.fetch_marketplace_list(page) marketplace_knowledges_with_install = Knowledges.get_knowledge_install_details(db.session, marketplace_knowledges, organisation) for knowledge in marketplace_knowledges_with_install: @@ -56,7 +57,7 @@ def get_marketplace_knowledge_list(page: int = 0): @router.get("/user/list") def get_user_knowledge_list(organisation = Depends(get_user_organisation)): - marketplace_knowledges = Knowledges.fetch_marketplace_list(page=0) + marketplace_knowledges = Knowledges.fetch_marketplace_list(page=-1) user_knowledge_list = Knowledges.get_organisation_knowledges(db.session, organisation) for user_knowledge in user_knowledge_list: if user_knowledge["name"] in [knowledge.name for knowledge in marketplace_knowledges]: From 7956da5e7ffa1c04f008585a007e3205044b3976 Mon Sep 17 00:00:00 2001 From: abhijeet Date: Fri, 28 Jul 2023 12:51:42 +0530 Subject: [PATCH 3/5] fixed --- superagi/controllers/knowledges.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superagi/controllers/knowledges.py b/superagi/controllers/knowledges.py index b1900238b..91b1bd4ff 100644 --- a/superagi/controllers/knowledges.py +++ b/superagi/controllers/knowledges.py @@ -57,7 +57,7 @@ def get_marketplace_knowledge_list(page: int = 0): @router.get("/user/list") def get_user_knowledge_list(organisation = Depends(get_user_organisation)): - marketplace_knowledges = Knowledges.fetch_marketplace_list(page=-1) + marketplace_knowledges = Knowledges.fetch_marketplace_list(page=0) user_knowledge_list = Knowledges.get_organisation_knowledges(db.session, organisation) for user_knowledge in user_knowledge_list: if user_knowledge["name"] in [knowledge.name for knowledge in marketplace_knowledges]: From 152a329a76c1c0cd8a44c02399fa6b5ccb0adc02 Mon Sep 17 00:00:00 2001 From: abhijeet Date: Fri, 28 Jul 2023 13:14:11 +0530 Subject: [PATCH 4/5] auth fix --- superagi/controllers/knowledge_configs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superagi/controllers/knowledge_configs.py b/superagi/controllers/knowledge_configs.py index 86a2abc63..b1370ff85 100644 --- a/superagi/controllers/knowledge_configs.py +++ b/superagi/controllers/knowledge_configs.py @@ -9,7 +9,7 @@ router = APIRouter() @router.get("/marketplace/details/{knowledge_id}") -def get_marketplace_knowledge_configs(knowledge_id: int, Authorize: AuthJWT = Depends(check_auth)): +def get_marketplace_knowledge_configs(knowledge_id: int): knowledge_configs = db.session.query(KnowledgeConfigs).filter(KnowledgeConfigs.knowledge_id == knowledge_id).all() return knowledge_configs From 8fa2a4c546e7383ebcc7465247837024876da803 Mon Sep 17 00:00:00 2001 From: abhijeet Date: Fri, 28 Jul 2023 13:16:08 +0530 Subject: [PATCH 5/5] removed log --- superagi/llms/openai.py | 1 - 1 file changed, 1 deletion(-) diff --git a/superagi/llms/openai.py b/superagi/llms/openai.py index 4822ca1e5..b8a97a44a 100644 --- a/superagi/llms/openai.py +++ b/superagi/llms/openai.py @@ -113,7 +113,6 @@ def get_models(self): models = openai.Model.list() models = [model["id"] for model in models["data"]] models_supported = ['gpt-4', 'gpt-3.5-turbo', 'gpt-3.5-turbo-16k', 'gpt-4-32k'] - print("CHECK THIS1", models) models = [model for model in models if model in models_supported] return models except Exception as exception: