Fix links to the Discourse docs in the Discourse Loader (#1251)

This commit is contained in:
Oskar
2024-02-09 17:21:52 +01:00
committed by GitHub
parent 7ad4af250f
commit 9478bab04e

View File

@@ -14,19 +14,19 @@ class DiscourseLoader(BaseLoader):
super().__init__() super().__init__()
if not config: if not config:
raise ValueError( raise ValueError(
"DiscourseLoader requires a config. Check the documentation for the correct format - `https://docs.embedchain.ai/data-sources/discourse`" # noqa: E501 "DiscourseLoader requires a config. Check the documentation for the correct format - `https://docs.embedchain.ai/components/data-sources/discourse`" # noqa: E501
) )
self.domain = config.get("domain") self.domain = config.get("domain")
if not self.domain: if not self.domain:
raise ValueError( raise ValueError(
"DiscourseLoader requires a domain. Check the documentation for the correct format - `https://docs.embedchain.ai/data-sources/discourse`" # noqa: E501 "DiscourseLoader requires a domain. Check the documentation for the correct format - `https://docs.embedchain.ai/components/data-sources/discourse`" # noqa: E501
) )
def _check_query(self, query): def _check_query(self, query):
if not query or not isinstance(query, str): if not query or not isinstance(query, str):
raise ValueError( raise ValueError(
"DiscourseLoader requires a query. Check the documentation for the correct format - `https://docs.embedchain.ai/data-sources/discourse`" # noqa: E501 "DiscourseLoader requires a query. Check the documentation for the correct format - `https://docs.embedchain.ai/components/data-sources/discourse`" # noqa: E501
) )
def _load_post(self, post_id): def _load_post(self, post_id):