FIX: Don't try to use pg headlines for semantic search. (#36)
Depends on discourse/discourse#20939.
This commit is contained in:
parent
7a54455cf6
commit
333cb8f212
|
@ -16,6 +16,7 @@ module DiscourseAi
|
||||||
type_filter: SEMANTIC_SEARCH_TYPE,
|
type_filter: SEMANTIC_SEARCH_TYPE,
|
||||||
term: query,
|
term: query,
|
||||||
search_context: guardian,
|
search_context: guardian,
|
||||||
|
use_pg_headlines_for_excerpt: false,
|
||||||
)
|
)
|
||||||
|
|
||||||
model =
|
model =
|
||||||
|
|
|
@ -55,7 +55,9 @@ export default {
|
||||||
initialize(container) {
|
initialize(container) {
|
||||||
const settings = container.lookup("site-settings:main");
|
const settings = container.lookup("site-settings:main");
|
||||||
|
|
||||||
if (settings.ai_embeddings_enabled) {
|
const semanticSearch = settings.ai_embeddings_semantic_search_enabled;
|
||||||
|
|
||||||
|
if (settings.ai_embeddings_enabled && semanticSearch) {
|
||||||
withPluginApi("1.6.0", initializeSemanticSearch);
|
withPluginApi("1.6.0", initializeSemanticSearch);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -48,6 +48,7 @@ en:
|
||||||
ai_embeddings_semantic_related_topics: "Maximum number of topics to show in related topic section."
|
ai_embeddings_semantic_related_topics: "Maximum number of topics to show in related topic section."
|
||||||
ai_embeddings_pg_connection_string: "PostgreSQL connection string for the embeddings module. Needs pgvector extension enabled and a series of tables created. See docs for more info."
|
ai_embeddings_pg_connection_string: "PostgreSQL connection string for the embeddings module. Needs pgvector extension enabled and a series of tables created. See docs for more info."
|
||||||
ai_embeddings_semantic_search_model: "Model to use for semantic search."
|
ai_embeddings_semantic_search_model: "Model to use for semantic search."
|
||||||
|
ai_embeddings_semantic_search_enabled: "Enable full-page semantic search."
|
||||||
|
|
||||||
reviewables:
|
reviewables:
|
||||||
reasons:
|
reasons:
|
||||||
|
|
|
@ -146,3 +146,6 @@ plugins:
|
||||||
ai_embeddings_semantic_related_topics_enabled: false
|
ai_embeddings_semantic_related_topics_enabled: false
|
||||||
ai_embeddings_semantic_related_topics: 5
|
ai_embeddings_semantic_related_topics: 5
|
||||||
ai_embeddings_pg_connection_string: ""
|
ai_embeddings_pg_connection_string: ""
|
||||||
|
ai_embeddings_semantic_search_enabled:
|
||||||
|
default: false
|
||||||
|
client: true
|
||||||
|
|
Loading…
Reference in New Issue