pub struct RagSettings {Show 26 fields
pub workspace: String,
pub provider: ChatProvider,
pub ollama_model: String,
pub deepseek_model: String,
pub temperature: f64,
pub max_tokens: usize,
pub context_tokens: usize,
pub system_prompt: String,
pub stream: bool,
pub embed_model: String,
pub top_k: usize,
pub similarity_threshold: f64,
pub chunk_size: usize,
pub chunk_overlap: usize,
pub pdf_backend: PdfBackend,
pub sloppy_pdf: bool,
pub memory: MemoryChoice,
pub memory_model: String,
pub grobid_url: String,
pub rename_pdfs: bool,
pub openalex: bool,
pub resolve_citations: bool,
pub corpus_dirs: Vec<String>,
pub profile_name: String,
pub profiles: Vec<String>,
pub status: Option<String>,
}Expand description
Editable configuration shown by the settings page.
This mirrors the Ragrig fields a chat surface exposes. Secrets never enter this struct: the DeepSeek key is read from the environment by the worker.
Fields§
§workspace: StringWorkspace folder holding the store and sessions.
provider: ChatProviderActive chat backend.
ollama_model: StringOllama chat model.
deepseek_model: StringDeepSeek chat model.
temperature: f64Sampling temperature.
max_tokens: usizeMaximum generated tokens.
context_tokens: usizeChat context window in tokens.
system_prompt: StringSystem prompt sent before the conversation.
stream: boolStream tokens into the transcript.
embed_model: StringOllama embedding model.
top_k: usizeChunks retrieved per query.
similarity_threshold: f64Minimum similarity for a chunk to enter the prompt.
chunk_size: usizeTarget chunk size in tokens.
chunk_overlap: usizeToken overlap between chunks.
pdf_backend: PdfBackendPDF parser selected as primary.
sloppy_pdf: boolKeep the sloppy PDF fallback registered.
memory: MemoryChoiceConversation memory strategy.
memory_model: StringSmall model used for rewriting and summaries.
grobid_url: StringBase URL of the GROBID server.
rename_pdfs: boolRename PDFs to their metadata name during reference extraction.
openalex: boolComplete extracted references against OpenAlex.
resolve_citations: boolAttach @key papers mentioned in a question as one-shot context.
corpus_dirs: Vec<String>Named folder corpora in name=path form.
profile_name: StringProfile name typed by the user.
profiles: Vec<String>Profiles found in the workspace.
status: Option<String>Last settings action result, shown under the Apply row.
Implementations§
Source§impl RagSettings
impl RagSettings
Sourcepub fn from_config(config: &RagrigConfig) -> Self
pub fn from_config(config: &RagrigConfig) -> Self
Read the editable fields from a Ragrig configuration.
Sourcepub fn to_config(&self) -> Result<RagrigConfig, String>
pub fn to_config(&self) -> Result<RagrigConfig, String>
Validate and convert to a Ragrig configuration.
Sourcepub fn to_setup(&self) -> Result<RagSetup, String>
pub fn to_setup(&self) -> Result<RagSetup, String>
Validate and produce a build setup, including the prompt override.
Sourcepub fn validate(&self) -> Result<(), String>
pub fn validate(&self) -> Result<(), String>
Check the editable values without touching the filesystem.
Sourcepub fn refresh_profiles(&mut self)
pub fn refresh_profiles(&mut self)
Re-read the profile list from the workspace.
Sourcepub fn save_profile(&mut self) -> Result<(), String>
pub fn save_profile(&mut self) -> Result<(), String>
Save these settings as a named profile in the workspace.
Sourcepub fn load_profile(&mut self, name: &str) -> Result<(), String>
pub fn load_profile(&mut self, name: &str) -> Result<(), String>
Load a named profile from the workspace into the editable fields.
Sourcepub fn add_corpus(&mut self, name: &str, folder: &Path)
pub fn add_corpus(&mut self, name: &str, folder: &Path)
Remember a folder corpus so later applies keep it.
Trait Implementations§
Source§impl Clone for RagSettings
impl Clone for RagSettings
Source§impl Debug for RagSettings
impl Debug for RagSettings
Source§impl Default for RagSettings
impl Default for RagSettings
Source§impl PartialEq for RagSettings
impl PartialEq for RagSettings
impl StructuralPartialEq for RagSettings
Auto Trait Implementations§
impl Freeze for RagSettings
impl RefUnwindSafe for RagSettings
impl Send for RagSettings
impl Sync for RagSettings
impl Unpin for RagSettings
impl UnsafeUnpin for RagSettings
impl UnwindSafe for RagSettings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().