-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathollama.ts
More file actions
46 lines (43 loc) · 1.1 KB
/
ollama.ts
File metadata and controls
46 lines (43 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { DocItem } from "../types";
type OllamaMetadata = {
title: string;
};
const ollama: DocItem = {
"en-US": {
icon: "../assets/logo/ollama.png",
apiKey: "tr-T6JLeTkFXeNbNPyhijtI9XhIncydQQ3O",
datasetId: "61d88682-c9e5-4b83-8a6e-0b01280b26de",
type: "trieve",
homepage: "https://docs.ollama.com/",
baseUrl: "https://api.mintlifytrieve.com",
searchType: "fulltext",
searchParameters: {
highlight_options: {
highlight_delimiters: ["?", ",", ".", "!", "↵"],
highlight_strategy: "exactmatch",
},
filters: {
must_not: [
{
field: "tag_set",
match_all: ["code"],
},
],
},
extend_results: true,
page_size: 10,
},
formatter: (searchResults) => {
return searchResults.map((item, index) => {
return {
title: (item.chunk.metadata as OllamaMetadata).title,
url: item.chunk.url,
id: `${index}`,
content: item.chunk.chunk_html,
objectID: item.chunk.id,
};
});
},
},
};
export default ollama;