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

Create KB endpoints returns 500 when no default LLM exists #427

Closed
634750802 opened this issue Dec 2, 2024 · 3 comments
Closed

Create KB endpoints returns 500 when no default LLM exists #427

634750802 opened this issue Dec 2, 2024 · 3 comments
Assignees

Comments

@634750802
Copy link
Collaborator

634750802 commented Dec 2, 2024

LLM

2024-12-02 13:25:02 2024-12-02 05:25:02,605 - app.api.admin_routes.knowledge_base.routes:90 - ERROR - 404: default llm is not found
2024-12-02 13:25:02 Traceback (most recent call last):
2024-12-02 13:25:02   File "/app/app/api/admin_routes/knowledge_base/routes.py", line 62, in create_knowledge_base
2024-12-02 13:25:02     create.llm_id = llm_repo.must_get_default_llm(session).id
2024-12-02 13:25:02                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-02 13:25:02   File "/app/app/repositories/llm.py", line 33, in must_get_default_llm
2024-12-02 13:25:02     raise DefaultLLMNotFoundError()
2024-12-02 13:25:02 app.exceptions.DefaultLLMNotFoundError: 404: default llm is not found
2024-12-02 13:25:02 2024-12-02 05:25:02,607 - sqlalchemy.engine.Engine:2702 - INFO - ROLLBACK
2024-12-02 13:25:02 2024-12-02 05:25:02,609 - sqlalchemy.engine.Engine:2702 - INFO - ROLLBACK
2024-12-02 13:25:02 2024-12-02 05:25:02,610 - uvicorn.access:466 - INFO - 172.21.0.7:42454 - "POST /api/v1/admin/knowledge_bases HTTP/1.1" 500

Embedding Model

2024-12-02 13:26:36 2024-12-02 05:26:36,426 - app.api.admin_routes.knowledge_base.routes:90 - ERROR - 404: default embedding model is not found
2024-12-02 13:26:36 Traceback (most recent call last):
2024-12-02 13:26:36   File "/app/app/api/admin_routes/knowledge_base/routes.py", line 65, in create_knowledge_base
2024-12-02 13:26:36     create.embedding_model_id = embed_model_repo.must_get_default_model(session).id
2024-12-02 13:26:36                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-02 13:26:36   File "/app/app/repositories/embedding_model.py", line 72, in must_get_default_model
2024-12-02 13:26:36     raise DefaultEmbeddingModelNotFoundError()
2024-12-02 13:26:36 app.exceptions.DefaultEmbeddingModelNotFoundError: 404: default embedding model is not found
2024-12-02 13:26:36 2024-12-02 05:26:36,428 - sqlalchemy.engine.Engine:2702 - INFO - ROLLBACK
2024-12-02 13:26:36 2024-12-02 05:26:36,429 - sqlalchemy.engine.Engine:2702 - INFO - ROLLBACK
2024-12-02 13:26:36 2024-12-02 05:26:36,430 - uvicorn.access:466 - INFO - 172.21.0.7:58312 - "POST /api/v1/admin/knowledge_bases HTTP/1.1" 500
@634750802 634750802 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2024
@634750802 634750802 reopened this Dec 2, 2024
@sykp241095
Copy link
Member

Should we fix thus issues before releasing v0.3?

@634750802
Copy link
Collaborator Author

Yes

@Mini256
Copy link
Member

Mini256 commented Dec 3, 2024

@634750802 For now, these error will return to the FE, please handle these errors.

{
  "detail": "default embedding model is not found"
}

except KBNoVectorIndexConfigured as e:

Also pydantic field_validator will throw some errors like this:

{
  "detail": [
    {
      "type": "value_error",
      "loc": [
        "body",
        "name"
      ],
      "msg": "Value error, Please provide a name for the knowledge base",
      "input": "",
      "ctx": {
        "error": {}
      }
    }
  ]
}

@Mini256 Mini256 assigned 634750802 and unassigned Mini256 Dec 3, 2024
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

No branches or pull requests

3 participants