Skip to content

Commit

Permalink
docs(indexing): document the default prompt templates and their conte…
Browse files Browse the repository at this point in the history
…xt (#206)
  • Loading branch information
timonv authored Jul 28, 2024
1 parent 2114aa4 commit 573aff6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions swiftide-indexing/src/transformers/metadata_keywords.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ pub const NAME: &str = "Keywords";
pub struct MetadataKeywords {
#[builder(setter(custom))]
client: Arc<dyn SimplePrompt>,
/// The prompt templated used. Can be overwritten via the builder. Has the `node` available as
/// context.
#[builder(default = "default_prompt()")]
prompt_template: PromptTemplate,
#[builder(default)]
Expand Down
2 changes: 2 additions & 0 deletions swiftide-indexing/src/transformers/metadata_qa_code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ pub struct MetadataQACode {
#[builder(setter(custom))]
client: Arc<dyn SimplePrompt>,
#[builder(default = "default_prompt()")]
/// The prompt templated used. Can be overwritten via the builder. Has the `node` and
/// `num_questions` available as context.
prompt_template: PromptTemplate,
#[builder(default = "5")]
num_questions: usize,
Expand Down
2 changes: 2 additions & 0 deletions swiftide-indexing/src/transformers/metadata_qa_text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ pub struct MetadataQAText {
#[builder(setter(custom))]
client: Arc<dyn SimplePrompt>,
#[builder(default = "default_prompt()")]
/// The prompt templated used. Can be overwritten via the builder. Has the `node` and
/// `num_questions` available as context.
prompt_template: PromptTemplate,
#[builder(default = "5")]
num_questions: usize,
Expand Down
2 changes: 2 additions & 0 deletions swiftide-indexing/src/transformers/metadata_summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ pub struct MetadataSummary {
#[builder(setter(custom))]
client: Arc<dyn SimplePrompt>,
#[builder(default = "default_prompt()")]
/// The prompt templated used. Can be overwritten via the builder. Has the `node` available as
/// context.
prompt_template: PromptTemplate,
#[builder(default)]
concurrency: Option<usize>,
Expand Down
2 changes: 2 additions & 0 deletions swiftide-indexing/src/transformers/metadata_title.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ pub struct MetadataTitle {
#[builder(setter(custom))]
client: Arc<dyn SimplePrompt>,
#[builder(default = "default_prompt()")]
/// The prompt templated used. Can be overwritten via the builder. Has the `node` available as
/// context.
prompt_template: PromptTemplate,
#[builder(default)]
concurrency: Option<usize>,
Expand Down

0 comments on commit 573aff6

Please sign in to comment.