Skip to content

Commit af63f7d

Browse files
committed
Adds a filter to allow modifying the prompt programmatically
1 parent 9f21cd7 commit af63f7d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

includes/classes/Feature/RAG.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,11 @@ public function get_ai_response( $search_term, $search_vectors = null ) {
279279
];
280280
}
281281

282-
$prompt = $this->get_prompt( $posts_representations );
282+
$prompt = apply_filters(
283+
'ep_rag_prompt',
284+
$this->get_prompt( $posts_representations ),
285+
$posts_representations
286+
);
283287
$response = $this->ai_api_request( $prompt, $search_term );
284288

285289
/**

0 commit comments

Comments
 (0)