Comments (3)
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.
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.
solved
from langroid.
Related Issues (20)
- Add badge for colab and add the tabular chatting app HOT 1
- Example apps: if bad user input, retry instead of raising error & quitting
- Add example of google search + `DocChatAgent` HOT 3
- Missing API key while using GoogleSearchTool HOT 2
- Compute the cost of chat completion tasks HOT 8
- Integration with Azure OpenAI HOT 1
- DocChatAgent should take message history into account, for relevant doc retrieval
- PyPi badge not showing latest version HOT 3
- `num_tokens` reports different number of prompt tokens in contrast to OpenAI's Usage HOT 4
- Message queue communication
- Allow i/o from/to websocket
- Bug: DocChatAgent not using stand-alone query HOT 1
- test cases that uses openai after Azure test case HOT 1
- Compute cost for Azure Openai HOT 5
- Prepend Tokens/ContextLength and cost in displayed LLM output HOT 5
- Length of prompt history becomes negative after being shortened HOT 5
- Docker build failing HOT 1
- disable pytest when unrelated files changed HOT 1
- increase font size in docs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from langroid.