Skip to content

Update Signature instructions #8059

Closed
Closed
@Francisca266

Description

@Francisca266

What feature would you like to see?

When we call a Signature, like this:
class MySig(dspy.Signature): """Initial instruction""" input: str = InputField(desc="...") output: int = OutputField(desc="...")
If I update the instruction like MySig.instructions = "new prompt" it will work, but if I reload the page or restart, the instructions revert back to "Initial Instruction".

I’d prefer not to create a new Signature programmatically every time I want to update the instruction.
Is there way for overriding or replacing instructions that doesn’t involve redefining classes?
Thanks

Would you like to contribute?

  • Yes, I'd like to help implement this.
  • No, I just want to request it.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions