Git Product home page Git Product logo

Comments (3)

pchalasani avatar pchalasani commented on June 12, 2024

the most important part you left out is, what was your pydantic tool definition? The err is clearly saying that the example is missing one of the fields that is defined as required (i.e. does not have a default) in the Tool definition

from langroid.

Mohannadcse avatar Mohannadcse commented on June 12, 2024
alloy_spec = """
    sig Book {
    authors: set Author
    }

    sig Author {
        books: set Book
    }

    fact {
        // Each author of a book is listed in the book's authors.
        all b: Book, a: Author | a in b.authors iff b in a.books
    }

    assert NoAuthorWithoutBook {
        // There shouldn't be an author who hasn't authored any book.
        no a: Author | a.books = none
    }

    check NoAuthorWithoutBook
"""

bug = """{"BUG"}: books: set Book"""

fix = """{"FIX"}: books: some Book"""

class VerifierMessage(ToolMessage):
    request: str = "run_alloy_analyzer"
    purpose: str = """
        To show a <specification> to the user. Use this tool whenever you
        want to SHOW or VALIDATE a <specification>. NEVER list out a <specification>
        without using this tool. <bug> a list of line or set of lines in
        the specification that contains the bug. <fix> is a list of line or set of
        lines BUT after fixing the bug.
    """
    specification: str
    bug: List[str]
    fix: List[str]

    @classmethod
    def examples(cls) -> List["ToolMessage"]:
        return [
            cls(
                specification=f"""{alloy_spec}""",
                bug=[f"""{bug}"""],
                repair=[f"""{fix}"""],
                result="No Counterexample found",
            ),
        ]

from langroid.

Mohannadcse avatar Mohannadcse commented on June 12, 2024

solved

from langroid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.