From 384703826770aaee2e4b59847ad2eb92e0c1e573 Mon Sep 17 00:00:00 2001 From: Arshad Yaseen Date: Tue, 10 Sep 2024 12:38:22 +0530 Subject: [PATCH] Update README --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 7d571aaa..30eff0a9 100644 --- a/README.md +++ b/README.md @@ -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: