Skip to content
Snippets Groups Projects
Unverified Commit 32ad0992 authored by Talha Jubair Siam's avatar Talha Jubair Siam Committed by GitHub
Browse files

docs : fix correctness and relevancy example (#913)

parent af650343
Branches
Tags
No related merge requests found
......@@ -21,7 +21,7 @@ export OPENAI_API_KEY=your-api-key
Import the required modules:
```ts
import { CorrectnessEvaluator, OpenAI, Settings } from "llamaindex";
import { CorrectnessEvaluator, OpenAI, Settings, Response } from "llamaindex";
```
Let's setup gpt-4 for better results:
......@@ -45,7 +45,7 @@ const evaluator = new CorrectnessEvaluator();
const result = await evaluator.evaluateResponse({
query,
response,
response: new Response(response),
});
console.log(
......
......@@ -21,7 +21,13 @@ export OPENAI_API_KEY=your-api-key
Import the required modules:
```ts
import { RelevancyEvaluator, OpenAI, Settings } from "llamaindex";
import {
RelevancyEvaluator,
OpenAI,
Settings,
Document,
VectorStoreIndex,
} from "llamaindex";
```
Let's setup gpt-4 for better results:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment