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

Offset fix #898

Merged
merged 5 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all 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/controllers/knowledge_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

5 changes: 3 additions & 2 deletions superagi/controllers/knowledges.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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=-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]:
Expand Down
1 change: 0 additions & 1 deletion superagi/llms/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down