feat(pr_handler): Create PR title and description generation rules #1
@ -1,11 +1,12 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
// this is a test comment
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[allow(unused)]
|
||||
pub struct GenRes {
|
||||
model: String,
|
||||
created_at: String,
|
||||
response: String,
|
||||
pub response: String,
|
||||
done: bool,
|
||||
total_duration: u64,
|
||||
load_duration: u64,
|
||||
@ -19,6 +20,9 @@
|
||||
struct GenOptions {
|
||||
temperature: f32,
|
||||
num_predict: u8,
|
||||
repeat_last_n: u8,
|
||||
top_k: u8,
|
||||
top_p: f32
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
@ -33,16 +37,19 @@
|
||||
|
||||
impl MindGen {
|
||||
#[allow(unused)]
|
||||
pub fn new(input: &str) -> Self {
|
||||
pub fn new(input: String) -> Self {
|
||||
Self {
|
||||
model: String::from("llama3.1"),
|
||||
stream: false,
|
||||
raw: false,
|
||||
prompt: String::from(input),
|
||||
system: String::from("You are a commit message generator. You will generate commit messages following this format Task(<task #>): <commit message> making sure to never go over 90 characters"),
|
||||
prompt: input,
|
||||
system: String::from("create a short commit message from this diff, with format Task(<branch_name>): <commit_message>. only respond with the commit message"),
|
||||
options: GenOptions {
|
||||
temperature: 0.5,
|
||||
num_predict: 90
|
||||
temperature: 0.1,
|
||||
num_predict: 0,
|
||||
repeat_last_n: 0,
|
||||
top_k: 10,
|
||||
top_p: 0.5
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user