Skip to content

Commit

Permalink
Show indexing error for the embeddings index
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Sep 29, 2023
1 parent 0a0f84c commit 5a75864
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/routes-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -7528,6 +7528,7 @@ ${Buffer.from(data.content, 'base64url').toString('base64')}

documentStoreEnabled: await settings.get('documentStoreEnabled'),
hasOpenAiAPIKey: !!(await settings.get('openAiAPIKey')),
indexInfo: await settings.get('embeddings:index'),

openAiModels: pfStructuredClone(OPEN_AI_MODELS_CHAT).map(model => {
model.selected = model.key === documentStoreChatModel;
Expand Down Expand Up @@ -7570,6 +7571,7 @@ ${Buffer.from(data.content, 'base64url').toString('base64')}

documentStoreEnabled: await settings.get('documentStoreEnabled'),
hasOpenAiAPIKey: !!(await settings.get('openAiAPIKey')),
indexInfo: await settings.get('embeddings:index'),

openAiModels: pfStructuredClone(OPEN_AI_MODELS_CHAT).map(model => {
model.selected = model.key === request.payload.documentStoreChatModel;
Expand Down Expand Up @@ -7614,6 +7616,7 @@ ${Buffer.from(data.content, 'base64url').toString('base64')}

documentStoreEnabled: await settings.get('documentStoreEnabled'),
hasOpenAiAPIKey: !!(await settings.get('openAiAPIKey')),
indexInfo: await settings.get('embeddings:index'),

openAiModels: pfStructuredClone(OPEN_AI_MODELS_CHAT).map(model => {
model.selected = model.key === request.payload.documentStoreChatModel;
Expand Down
7 changes: 7 additions & 0 deletions views/config/document-store/chat.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@

<div class="card-body">

{{#if indexInfo.error}}
<div class="alert alert-danger">
<strong>Index handling failed:</strong> <br>
<pre>{{indexInfo.error}}</pre>
</div>
{{/if}}

<div class="form-group">

<div class="text-muted float-right code-link">[<a href="/admin/iframe/docs#/Settings/postV1Settings"
Expand Down

0 comments on commit 5a75864

Please sign in to comment.