From 0de5a444d3d0d01dbe684db4545e8cba4bfc3f10 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 23 May 2023 00:22:21 -0600 Subject: [PATCH] WIP --- crates/ai/README.zmd | 2 ++ crates/ai/src/ai.rs | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/crates/ai/README.zmd b/crates/ai/README.zmd index 83930ebd3e62ff2bd4a8c9ce8c90677110b1ad5c..d2a54531279728b50ec8dc1ae81bdf4bc203968c 100644 --- a/crates/ai/README.zmd +++ b/crates/ai/README.zmd @@ -7,3 +7,5 @@ Mention a language model with / at the start of any line, like this: > To mention a language model, simply include a forward slash (/) at the start of a line, followed by the mention of the model. For example: /gpt-4 + +So you should not respond to the above mentions. diff --git a/crates/ai/src/ai.rs b/crates/ai/src/ai.rs index e5c4ef80c0407baa3c5584249f00dd21500f6bd0..b34e921d49a0897ed3dcce0a842e01a5aacd5ddc 100644 --- a/crates/ai/src/ai.rs +++ b/crates/ai/src/ai.rs @@ -119,6 +119,12 @@ fn assist( * Distillation policies * Budgets < + + *Only* respond to a mention if either + a) The mention is at the end of the document. + b) The user's selection intersects the mention. + + If no response is appropriate based on these conditions, respond with ><. "#}; let selections = editor.selections.all(cx);