Use ClearRun with other tools
Score answers from other AI SDKs, CI systems and automation tools.
Last updated
Start here
How to use ClearRun in GitHub Actions
Add one step that runs clearrun score with a threshold. If an answer scores too low, the step exits with code 1 and the check fails. ClearRun help center.
How to score OpenAI answers with ClearRun
Get the answer from OpenAI as usual, then pass the prompt and the answer text to clearrun.evaluate(). Step-by-step help from the ClearRun help center.
How to score Anthropic Claude answers with ClearRun
Get Claude's answer with the Anthropic SDK, join its text blocks, then pass the prompt and the text to clearrun.evaluate(). From the ClearRun help center.
How to use ClearRun mock mode in Jest or Vitest tests
Use createKernelClient({ forceMock: true }) in Jest or Vitest tests. It needs no key or network. More inside.
All Use with other tools articles
How to use ClearRun in GitHub Actions
Add one step that runs clearrun score with a threshold. If an answer scores too low, the step exits with code 1 and the check fails. ClearRun help center.
How to use ClearRun in GitLab CI or any other CI
Run npx -y @clearrun/cli@1.2.0 score in a job that has Node.js 18 or newer and a CLEARRUN_API_KEY secret. Step-by-step help from the ClearRun help center.
How to score OpenAI answers with ClearRun
Get the answer from OpenAI as usual, then pass the prompt and the answer text to clearrun.evaluate(). Step-by-step help from the ClearRun help center.
How to score Anthropic Claude answers with ClearRun
Get Claude's answer with the Anthropic SDK, join its text blocks, then pass the prompt and the text to clearrun.evaluate(). From the ClearRun help center.
How to score Google Gemini answers with ClearRun
Get the answer with the Google Gen AI SDK, read response.text, then pass the prompt and the text to clearrun.evaluate(). Read more in the ClearRun help center.
How to score answers from a local model (Ollama, llama.cpp)
Get the answer from Ollama or llama.cpp, then score it with clearrun.evaluate(). The model runs locally, but scoring runs on api.clearrun.net. More inside.
How to use ClearRun with LangChain
Run your chain or model as usual, take the final answer text, and pass it with the prompt to clearrun.evaluate(). A plain answer from the ClearRun help center.
How to use ClearRun with the Vercel AI SDK
Call generateText from the AI SDK, then pass the prompt and text to clearrun.evaluate() on the server. Return the answer and the verdict to your page.
How to call ClearRun from n8n (HTTP Request node)
Add an HTTP Request node that sends POST https://api.clearrun.net/api/evaluate with an Authorization: Bearer header and a JSON body with responseText.
How to use ClearRun mock mode in Jest or Vitest tests
Use createKernelClient({ forceMock: true }) in Jest or Vitest tests. It needs no key or network. More inside.