Skip to content

Commit 00ddab3

Browse files
welkeyeverAsterDY
authored andcommitted
optimzie: prompt (cloudwego#15)
1 parent ee70b03 commit 00ddab3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/compress/compress.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ async fn llm_compress(func: &mut Function) {
9797
pub async fn _ollama_compress(func: String, ctx: HashMap<String, String>) -> String {
9898
let request_url = format!("http://localhost:11434/api/generate");
9999

100-
let mut prompt = r#"You are an engineer who is proficient in Golang. You are responsible for summarizing the functions/methods given by the user. The summary needs to include input parameters, output parameters, and function/method behavior (including side effects).DO NOT show any codes in your answer. Function/methods content is as follow:"#.to_string();
100+
let mut prompt = r#"You are an engineer who is proficient in Golang. You are responsible for summarizing the functions/methods given by the user.Try to condense output into one sentence and retain key information as much as possible. DO NOT show any codes in your answer. Function/methods content is as follow:"#.to_string();
101101

102102
prompt.push_str("\n");
103103
prompt.push_str(func.as_str());

0 commit comments

Comments
 (0)