Crate capability_example

Crate capability_example 

Source

Structs§

AutomatedFlowStrategy
A FlowStrategy for automated usage:
GrowerLanguageModelClient
Our language-model client using async-openai 0.27.x with a synchronous facade around the actual async calls.
GrowerModel
GrowerModelBuilder
Builder for GrowerModel.
ManualFlowStrategy
A FlowStrategy for purely manual usage:
ManualGrowerFlowCliArgs
ManualGrowerFlowCliArgsBuilder
Builder for ManualGrowerFlowCliArgs.
PartiallyGrownModel
PartiallyGrownModelBuilder
Builder for PartiallyGrownModel.

Enums§

ClipboardSnippet
Simple enum to hold whichever snippet we parsed successfully.
FuzzyLoadPartiallyGrownModelError
GrowerAnnotatedLeafHolderExpansionsGenerationError
GrowerCoreStringSkeletonGenerationError
GrowerLanguageModelClientError
GrowerModelBuilderError
Error type for GrowerModelBuilder
GrowerModelGenerationError
GrowerModelGenerationInvalidPartial
GrowerStringSkeletonGenerationError
GrowerTreeConfigurationGenerationError
ManualGrowerFlowCliArgsBuilderError
Error type for ManualGrowerFlowCliArgsBuilder
ManualGrowerFlowError
Represents errors that can occur during the manual grower flow.
PartiallyGrownModelBuilderError
Error type for PartiallyGrownModelBuilder

Traits§

ApplyClipboardSnippet
GrowerFlowStrategy
A trait representing how we fill in any missing partial-model fields. We can have multiple implementations of this:

Functions§

attempt_snippet_parse
Tries to parse the raw clipboard as type T.
Returns: Ok(Some(value)) if parse succeeded, Ok(None) if it wasn’t valid at all for that type (like a total JSON parse fail), Err(()) if it was valid JSON but fuzzy parse failed => we store it in fail-dir.
manual_flow_try_to_fix_missing_field
Called when validation of the partial model fails with a known “missing partial” error. We query the FlowStrategy to see if it can fill in the missing piece automatically or by prompting the user.
maybe_write_initial_partial_model_file
missing_field_rank
Return an integer rank for a missing partial step: 0 => partial is not missing anything (fully valid) 1 => MissingJustifiedGrowerTreeConfiguration 2 => MissingJustifiedStringSkeleton 3 => MissingStrippedStringSkeleton 4 => MissingCoreStringSkeleton 5 => MissingAnnotatedLeafHolderExpansions
precise_parse_clipboard_stripped_skeleton
Helper function for “precise parse” of StrippedStringSkeleton
snippet_field_rank
Return a similar rank for each ClipboardSnippet variant:
store_failed_snippet
try_deserialize_with_path
Attempt to deserialize val into T, returning an error string on failure that includes the JSON path (e.g. .capstone.probability).