Skip to content

Commit

Permalink
Add documentTemplate to embedders
Browse files Browse the repository at this point in the history
  • Loading branch information
CaroFG authored and tpayet committed Mar 5, 2024
1 parent e5562db commit 288a48c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs-scraper.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"default": {
"source": "openAi",
"apiKey": "embedderApiKey",
"model": "text-embedding-ada-002"
"model": "text-embedding-ada-002",
"documentTemplate": "{% if doc.hierarchy_lvl0 != null %}Starting with the theme '{{doc.hierarchy_lvl0}}'. {% endif %}{% if doc.hierarchy_lvl1 != null %}A document titled '{{doc.hierarchy_lvl1}}'. {% endif %}{% if doc.hierarchy_lvl2 != null %}Under the section '{{doc.hierarchy_lvl2}}'. {% endif %}{% if doc.hierarchy_lvl3 != null %}This is further divided into '{{doc.hierarchy_lvl3}}'. {% endif %}{% if doc.hierarchy_lvl4 != null %}Which includes '{{doc.hierarchy_lvl4}}'. {% endif %}{% if doc.hierarchy_lvl5 != null %}Specifically focusing on '{{doc.hierarchy_lvl5}}'. {% endif %}{% if doc.anchor != null %}It's about {{doc.anchor}}. {% endif %}{% if doc.content != null %}It discusses {{doc.content|truncatewords: 200}}{% endif %}"
}
},
"searchableAttributes": [
Expand Down

0 comments on commit 288a48c

Please sign in to comment.