chatcops test: calls-tool and no-tool-call assertions
I maintainer di solito rispondono entro 1 giorno
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Lets an eval check that the bot called the right tool with the right input, or that it called none.
How assertions work
chatcops test (#394, with replays from #395 and the judge from #400) checks each turn's reply with the assertions in the eval file. They're registered by name in ASSERTIONS (packages/cli/src/test/assertions/index.ts:11). Each one is an AssertionCheck (packages/cli/src/test/types.ts): it gets the value from the YAML, the turn's TurnResult (text, toolCalls, sources, leads, usage, costUsd, latencyMs), the conversation so far, and a context with the eval file's path, and returns { pass, reason }. Throw for a bad value (see asStrings in assertions/values.ts), and the runner turns it into a failure with your message. The not- prefix works for every name without extra code.
contains in assertions/text.ts is the reference: one file per kind of assertion, added to the map. Write reasons a person can act on, such as the reply doesn't contain "$19".
What to add (new assertions/tools.ts)
calls-tool: a tool name (calls-tool: lookup_order), or{ name, args }.argsis a partial deep match against the call'sinput: every key inargshas to be there with an equal value, and extra keys in the input are fine. Nested objects match the same way, and arrays have to be equal.no-tool-call:truemeans the turn called no tool at all. A tool name means it didn't call that one.
The calls are in turn.toolCalls as { name, input }. The reason for a failure should list the calls that did happen, so people see what went wrong.
Acceptance criteria
- Unit tests: name only, partial args, nested args, a mismatch that lists the actual calls,
no-tool-callboth ways, bad values - An end to end test with a tool mock (see "answers tools from mocks" in
test-command.test.ts) - Documented in
website/src/content/docs/core/testing.mdx, with a changeset for@chatcops/cli(minor) -
pnpm test:coverageandpnpm lintpass
- Lingua principale
- TypeScript
- Stelle
- 13
- Fork
- 7
- Merge medio
- 3h 28m
- PR unite (30g)
- 296
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di codercops/chatcops
-
Core README lists old default modelsForse già presa @prakashNalla l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
codercops/chatcops#503 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Widget: theme.tokens to set any color or size token, and the full token table in the docsForse già presa @Sreehita-here l’ha presa oggi. Apertahacktoberfest
codercops/chatcops#500 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Widget: a header menu with New conversation, Download transcript and a privacy linkForse già presa @anurag2787 l’ha presa oggi. Apertahacktoberfest
codercops/chatcops#496 · 4 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Widget: keep a message sent while offline, and send it when the connection is backForse già presa @Saifjafri212213 l’ha presa oggi. Apertahacktoberfest
codercops/chatcops#495 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Widget: copy a completed assistant replyForse già presa @piyusshhjangid l’ha presa oggi. Apertahacktoberfest
codercops/chatcops#477 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di codercops/chatcops
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
Automattic/data-liberation-agent#1115 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Enhance blog readabilityApertaCSS enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
pychess/pychess-variants#2448 ·
I maintainer di solito rispondono entro 1 giorno
-
[architect] Stale planning/scratch files at repo root (COMPONENT_SPLIT_SUMMARY.md etc.) describe already-completed workForse già presa @hivecommons-hive l’ha presa oggi. Apertaagent/architect architecture help wanted stage/040-covered-by-pr tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
kubestellar/console#24716 ·
I maintainer di solito rispondono entro 1 giorno
-
helm-knative-apply.sh fails with Helm 4Forse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaarea: triage theme: undefined
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
jhipster/generator-jhipster#35895 ·
I maintainer di solito rispondono entro 1 giorno