Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
arshad-yaseen committed Sep 10, 2024
1 parent d04cef2 commit 3847038
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,20 @@ copilot.complete({
});
```

The `system` and `user` prompts in the `customPrompt` function are optional. Omitting either uses the default prompt for that field. Example of customizing only the system prompt:

```javascript
copilot.complete({
body,
options: {
customPrompt: metadata => ({
system:
'You are an AI assistant specialized in writing React components, focusing on creating clean...',
}),
},
});
```

#### Parameters

The `customPrompt` function receives a `completionMetadata` object with the following properties:
Expand Down

0 comments on commit 3847038

Please sign in to comment.