Skip to content

Commit

Permalink
πŸ“ specify in docs the return type of getContextItems
Browse files Browse the repository at this point in the history
  • Loading branch information
sestinj committed Jan 25, 2024
1 parent 2616a35 commit 0bc3b15
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/docs/customization/context-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,11 @@ interface CustomContextProvider {
}
```

As an example, let's say you have a set of internal documents that have been indexed in a vector database. You've set up a simple REST API that allows internal users to query and get back relevant snippets. This context provider will send the query to this server and return the results from the vector database.
As an example, let's say you have a set of internal documents that have been indexed in a vector database. You've set up a simple REST API that allows internal users to query and get back relevant snippets. This context provider will send the query to this server and return the results from the vector database. The return type of `getContextItems` _must_ be an array of objects that have all of the following properties:

- `name`: The name of the context item, which will be displayed as a title
- `description`: A longer description of the context item
- `content`: The actual content of the context item, which will be fed to the LLM as context

```typescript title="~/.continue/config.ts"
const RagContextProvider: CustomContextProvider = {
Expand Down

0 comments on commit 0bc3b15

Please sign in to comment.