updated gitignore and setup PKGBUILD for archlinux packaging
Continuous integration / build (push) Failing after 7m6s
Continuous integration / build (push) Failing after 7m6s
This commit is contained in:
@@ -2,3 +2,4 @@
|
||||
*/target
|
||||
/project
|
||||
Cargo.lock
|
||||
*pkg.tar.zst
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
pkgname=worldcoder
|
||||
pkgver=0.1.0
|
||||
pkgrel=1
|
||||
makedepends=('rust' 'cargo')
|
||||
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
|
||||
|
||||
# Generated in accordance to https://wiki.archlinux.org/title/Rust_package_guidelines.
|
||||
# Might require further modification depending on the package involved.
|
||||
prepare() {
|
||||
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
|
||||
}
|
||||
|
||||
build() {
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
export CARGO_TARGET_DIR=target
|
||||
cargo build --frozen --release --all-features
|
||||
}
|
||||
|
||||
check() {
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
cargo test --frozen --all-features
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,14 @@
|
||||
# Generated by makepkg 7.0.0
|
||||
# using fakeroot version 1.37.1.2
|
||||
pkgname = worldcoder-debug
|
||||
pkgbase = worldcoder
|
||||
xdata = pkgtype=debug
|
||||
pkgver = 0.1.0-1
|
||||
pkgdesc = Detached debugging symbols for worldcoder
|
||||
url =
|
||||
builddate = 1754708656
|
||||
packager = ZXQ5 <zxq5@zxq5.dev>
|
||||
size = 10880432
|
||||
arch = x86_64
|
||||
makedepend = rust
|
||||
makedepend = cargo
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../../bin/worldcoder
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../usr/bin/worldcoder.debug
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,14 @@
|
||||
# Generated by makepkg 7.0.0
|
||||
# using fakeroot version 1.37.1.2
|
||||
pkgname = worldcoder
|
||||
pkgbase = worldcoder
|
||||
xdata = pkgtype=pkg
|
||||
pkgver = 0.1.0-1
|
||||
pkgdesc =
|
||||
url =
|
||||
builddate = 1754708656
|
||||
packager = ZXQ5 <zxq5@zxq5.dev>
|
||||
size = 19103320
|
||||
arch = x86_64
|
||||
makedepend = rust
|
||||
makedepend = cargo
|
||||
Executable
BIN
Binary file not shown.
@@ -6,7 +6,7 @@ use std::sync::{Arc, Mutex};
|
||||
use crate::{
|
||||
PROJECT_FOLDER,
|
||||
editors::{settings_editor::ProjectSettings, tags::Tag},
|
||||
llm_integration::content_llm::{ContentAI, ReadyState},
|
||||
llm_integration::content_llm::{ContentAI, ReadyState, ReasoningEffort},
|
||||
util,
|
||||
};
|
||||
|
||||
@@ -370,6 +370,7 @@ impl MainEditor {
|
||||
content: self.content.content.clone(),
|
||||
instruction: String::new(),
|
||||
max_tokens: 1024,
|
||||
reasoning_effort: ReasoningEffort::default(),
|
||||
context_override: "".to_string(),
|
||||
result: Arc::new(Mutex::new(String::new())),
|
||||
open: true,
|
||||
|
||||
@@ -24,6 +24,7 @@ pub enum ContentAI {
|
||||
result: Arc<Mutex<String>>,
|
||||
ready: Arc<Mutex<ReadyState>>,
|
||||
temperature: f32,
|
||||
reasoning_effort: ReasoningEffort,
|
||||
model_override: String,
|
||||
},
|
||||
}
|
||||
@@ -98,6 +99,7 @@ impl ContentAI {
|
||||
ready,
|
||||
temperature,
|
||||
model_override,
|
||||
reasoning_effort,
|
||||
..
|
||||
} = self
|
||||
{
|
||||
@@ -154,6 +156,26 @@ impl ContentAI {
|
||||
.range(0.0..=2.0)
|
||||
.speed(0.1),
|
||||
);
|
||||
|
||||
ui.label("Reasoning effort");
|
||||
|
||||
egui::ComboBox::from_id_salt("reasoning_effort")
|
||||
.selected_text(reasoning_effort.to_string())
|
||||
.show_ui(ui, |ui| {
|
||||
ui.selectable_value(
|
||||
reasoning_effort,
|
||||
ReasoningEffort::Minimal,
|
||||
"Minimal",
|
||||
);
|
||||
ui.selectable_value(reasoning_effort, ReasoningEffort::Low, "Low");
|
||||
ui.selectable_value(
|
||||
reasoning_effort,
|
||||
ReasoningEffort::Medium,
|
||||
"Medium",
|
||||
);
|
||||
ui.selectable_value(reasoning_effort, ReasoningEffort::High, "High");
|
||||
});
|
||||
|
||||
ui.end_row();
|
||||
|
||||
ui.label("Model override");
|
||||
@@ -175,9 +197,11 @@ impl ContentAI {
|
||||
let ai_context = project.ai_context.clone();
|
||||
let result = result.clone();
|
||||
let ready = ready.clone();
|
||||
let reasoning_effort = reasoning_effort;
|
||||
|
||||
let options = AIOptions {
|
||||
max_completion_tokens: *max_tokens,
|
||||
reasoning_effort: *reasoning_effort,
|
||||
temperature: *temperature,
|
||||
model_override: if !model_override.is_empty() {
|
||||
Some(model_override.clone())
|
||||
@@ -271,10 +295,8 @@ pub fn continue_content(
|
||||
result: Arc<Mutex<String>>,
|
||||
ready: Arc<Mutex<ReadyState>>,
|
||||
) -> Result<(), Box<dyn std::error::Error>> {
|
||||
println!("here");
|
||||
*ready.lock().unwrap() = ReadyState::Generating;
|
||||
|
||||
println!("here2");
|
||||
let client = reqwest::blocking::Client::new();
|
||||
|
||||
let messages = vec![
|
||||
@@ -308,6 +330,7 @@ pub fn continue_content(
|
||||
temperature: options.temperature,
|
||||
max_tokens: options.max_completion_tokens,
|
||||
model: options.model_override,
|
||||
reasoning_effort: options.reasoning_effort,
|
||||
stream: true,
|
||||
};
|
||||
|
||||
@@ -338,6 +361,8 @@ pub fn continue_content(
|
||||
.send()?
|
||||
};
|
||||
|
||||
println!("success!");
|
||||
|
||||
let reader = BufReader::new(response);
|
||||
for line in reader.lines() {
|
||||
// initial loop to check if the user has terminated the generation
|
||||
@@ -376,6 +401,7 @@ pub fn continue_content(
|
||||
pub struct AIOptions {
|
||||
pub max_completion_tokens: usize,
|
||||
pub temperature: f32,
|
||||
pub reasoning_effort: ReasoningEffort,
|
||||
pub model_override: Option<String>,
|
||||
}
|
||||
|
||||
@@ -387,6 +413,35 @@ pub enum ReadyState {
|
||||
Halted,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Copy, Clone, PartialEq)]
|
||||
pub enum ReasoningEffort {
|
||||
#[serde(rename = "minimal")]
|
||||
Minimal,
|
||||
#[serde(rename = "low")]
|
||||
Low,
|
||||
#[serde(rename = "medium")]
|
||||
Medium,
|
||||
#[serde(rename = "high")]
|
||||
High,
|
||||
}
|
||||
|
||||
impl Default for ReasoningEffort {
|
||||
fn default() -> Self {
|
||||
ReasoningEffort::Low
|
||||
}
|
||||
}
|
||||
|
||||
impl ToString for ReasoningEffort {
|
||||
fn to_string(&self) -> String {
|
||||
match self {
|
||||
ReasoningEffort::Minimal => "Minimal".to_string(),
|
||||
ReasoningEffort::Low => "Low".to_string(),
|
||||
ReasoningEffort::Medium => "Medium".to_string(),
|
||||
ReasoningEffort::High => "High".to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Simple request structure
|
||||
#[derive(Serialize)]
|
||||
struct ChatRequest {
|
||||
@@ -394,6 +449,7 @@ struct ChatRequest {
|
||||
temperature: f32,
|
||||
max_tokens: usize,
|
||||
stream: bool,
|
||||
reasoning_effort: ReasoningEffort,
|
||||
|
||||
// if we give the API model:null it returns 500
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user