Skip to content

#cot helper #50

Open
Open

Description

@darinkishore

with typed signatures, #cot helper got removed. please add this back in.

Activity

  1. darinkishore commented on Feb 12, 2026

    @darinkishore
    CollaboratorAuthor

    Codebase audit

    ChainOfThought<S> exists in modules/chain_of_thought.rs and works — it wraps Predict<WithReasoning<S>> and returns Predicted<WithReasoning<SOutput>>.

    The old #cot was likely a field-level attribute shorthand (like #[cot] on an output field) that auto-expanded to include a reasoning field. With the typed signature system, the equivalent is now explicit:

    let cot = ChainOfThought::<MySignature>::new();

    Question: is the ask here for a #[cot] attribute on the #[derive(Signature)] macro that automatically wraps in WithReasoning? Something like:

    #[derive(Signature, Clone)]
    #[cot]  // or #[dsrs(cot)]
    struct QA {
        #[input] question: String,
        #[output] answer: String,
    }
    // Auto-generates a `reasoning: String` output field

    Or was #cot something different — a runtime helper function? Need to clarify what the old API looked like to know what to restore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions