pub struct DocsEnhancer { /* private fields */ }Expand description
Documentation enhancer using LLM
Implementations§
Source§impl DocsEnhancer
impl DocsEnhancer
Sourcepub fn new(model: String, cache_dir: Option<PathBuf>) -> Result<Self>
pub fn new(model: String, cache_dir: Option<PathBuf>) -> Result<Self>
Create a new documentation enhancer
Sourcepub fn with_base_url(
model: String,
base_url: &str,
cache_dir: Option<PathBuf>,
) -> Result<Self>
pub fn with_base_url( model: String, base_url: &str, cache_dir: Option<PathBuf>, ) -> Result<Self>
Create a new documentation enhancer with custom Ollama URL
Sourcepub fn is_available(&self) -> bool
pub fn is_available(&self) -> bool
Check if LLM is available
Sourcepub fn enhance_function_docs(
&self,
function_name: &str,
signature: &str,
context: &str,
) -> Result<Option<String>>
pub fn enhance_function_docs( &self, function_name: &str, signature: &str, context: &str, ) -> Result<Option<String>>
Enhance documentation for a function
Sourcepub fn suggest_names(
&self,
c_name: &str,
context: &str,
item_type: &str,
) -> Result<Option<Vec<String>>>
pub fn suggest_names( &self, c_name: &str, context: &str, item_type: &str, ) -> Result<Option<Vec<String>>>
Suggest better names for an item
Auto Trait Implementations§
impl !RefUnwindSafe for DocsEnhancer
impl !UnwindSafe for DocsEnhancer
impl Freeze for DocsEnhancer
impl Send for DocsEnhancer
impl Sync for DocsEnhancer
impl Unpin for DocsEnhancer
impl UnsafeUnpin for DocsEnhancer
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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 more