add llama-stack to pre-indexed documentation list
This commit is contained in:
parent
4308a20cba
commit
dc2801ed2a
2 changed files with 17 additions and 8 deletions
|
|
@ -362,11 +362,16 @@ export default class DocsService {
|
|||
isPreIndexedDoc: !!preIndexedDocs[startUrl],
|
||||
});
|
||||
|
||||
const docs: LanceDbDocsRow[] = await table
|
||||
.search(vector)
|
||||
.limit(nRetrieve)
|
||||
.where(`starturl = '${startUrl}'`)
|
||||
.execute();
|
||||
let docs: LanceDbDocsRow[] = [];
|
||||
try {
|
||||
docs = await table
|
||||
.search(vector)
|
||||
.limit(nRetrieve)
|
||||
.where(`starturl = '${startUrl}'`)
|
||||
.execute();
|
||||
} catch (e: any) {
|
||||
console.error("Error retrieving chunks from LanceDB", e);
|
||||
}
|
||||
|
||||
const hasIndexedDoc = await this.hasIndexedDoc(startUrl);
|
||||
|
||||
|
|
@ -553,9 +558,8 @@ export default class DocsService {
|
|||
private async getLanceTableNameFromEmbeddingsProvider(
|
||||
isPreIndexedDoc: boolean,
|
||||
) {
|
||||
const embeddingsProvider = await this.getEmbeddingsProvider(
|
||||
isPreIndexedDoc,
|
||||
);
|
||||
const embeddingsProvider =
|
||||
await this.getEmbeddingsProvider(isPreIndexedDoc);
|
||||
|
||||
const tableName = this.sanitizeLanceTableName(
|
||||
`${DocsService.lanceTableName}${embeddingsProvider.id}`,
|
||||
|
|
|
|||
|
|
@ -325,6 +325,11 @@ const preIndexedDocs: Record<
|
|||
rootUrl: "https://awscli.amazonaws.com/v2/documentation/api/latest/",
|
||||
faviconUrl: "https://docs.aws.amazon.com/favicon.ico",
|
||||
},
|
||||
"https://llama-stack.readthedocs.io/": {
|
||||
title: "Llama Stack",
|
||||
startUrl: "https://llama-stack.readthedocs.io/",
|
||||
rootUrl: "https://llama-stack.readthedocs.io/",
|
||||
},
|
||||
};
|
||||
|
||||
export default preIndexedDocs;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue