mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-06-10 05:57:48 +00:00
Reference PR in comments
This commit is contained in:
parent
b007ed6be9
commit
5810fb239f
@ -18,7 +18,7 @@ impl NewPromptError {
|
||||
Self { kind: NewPromptErrorKind::CannotParseTemplate(inner), fault: FaultSource::User }
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
#[allow(unused)] // See <https://github.com/meilisearch/meilisearch/pull/5593> for explanation
|
||||
pub(crate) fn invalid_fields_in_template(inner: liquid::Error) -> NewPromptError {
|
||||
Self { kind: NewPromptErrorKind::InvalidFieldsInTemplate(inner), fault: FaultSource::User }
|
||||
}
|
||||
@ -28,7 +28,7 @@ impl NewPromptError {
|
||||
pub enum NewPromptErrorKind {
|
||||
#[error("cannot parse template: {0}")]
|
||||
CannotParseTemplate(liquid::Error),
|
||||
#[allow(unused)]
|
||||
#[allow(unused)] // See <https://github.com/meilisearch/meilisearch/pull/5593> for explanation
|
||||
#[error("template contains invalid fields: {0}. Only `doc.*`, `fields[i].name`, `fields[i].value` are supported")]
|
||||
InvalidFieldsInTemplate(liquid::Error),
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ mod test {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
#[ignore] // See <https://github.com/meilisearch/meilisearch/pull/5593> for explanation
|
||||
fn template_missing_doc() {
|
||||
assert!(matches!(
|
||||
Prompt::new("{{title}}: {{overview}}".into(), None),
|
||||
@ -231,7 +231,7 @@ mod test {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
#[ignore] // See <https://github.com/meilisearch/meilisearch/pull/5593> for explanation
|
||||
fn template_fields_invalid() {
|
||||
assert!(matches!(
|
||||
// intentionally garbled field
|
||||
|
Loading…
x
Reference in New Issue
Block a user