From 8b86bb77c3542a73da459cee1aec09c33031da5b Mon Sep 17 00:00:00 2001 From: skcd Date: Thu, 1 Feb 2024 15:33:01 +0000 Subject: [PATCH] [sidecar] make the system message better --- llm_client/src/bin/code_llama_infill.rs | 4 +++- llm_client/src/bin/codellama_test.rs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/llm_client/src/bin/code_llama_infill.rs b/llm_client/src/bin/code_llama_infill.rs index 90ec534ec..2c258bb78 100644 --- a/llm_client/src/bin/code_llama_infill.rs +++ b/llm_client/src/bin/code_llama_infill.rs @@ -12,7 +12,9 @@ async fn main() { api_key: "cc10d6774e67efef2004b85efdb81a3c9ba0b7682cc33d59c30834183502208d".to_owned(), }); let togetherai = TogetherAIClient::new(); - let prompt = "
 def compute_gcd(x, y): return result ".to_owned();
+    let prompt =
+        "
 # This function is recursive\ndef compute_gcd(x, y): return result "
+            .to_owned();
     let request =
         LLMClientCompletionStringRequest::new(LLMType::CodeLlama13BInstruct, prompt, 0.2, None);
     let (sender, receiver) = tokio::sync::mpsc::unbounded_channel();
diff --git a/llm_client/src/bin/codellama_test.rs b/llm_client/src/bin/codellama_test.rs
index e58f7ab2d..a3f9f711c 100644
--- a/llm_client/src/bin/codellama_test.rs
+++ b/llm_client/src/bin/codellama_test.rs
@@ -128,7 +128,7 @@ Respect these rules at all times:
     2. // rest of code ..
     ```
     Here the codeblock has line numbers 1 and 2, do not write the line numbers in the codeblock
-- You are given the code which the user has selected explicitly in the USER SELECTED CODE section
+- Only use the code context provided to you in the message.
 - Pay special attention to the USER SELECTED CODE as these code snippets are specially selected by the user in their query  Source: assistant
 
  [#file:types.rs:52-66](values:file:types.rs:52-66) can you explain this code is doing?  Source: assistant