From 4817827d2479b68c9156789d09293c9b85d59c1b Mon Sep 17 00:00:00 2001
From: Tiago Pascoal <tspascoal@github.com>
Date: Sat, 5 Oct 2024 20:34:08 +0100
Subject: [PATCH] fix(readme): add `await` to `prompt.stream` example (#112)

Adds a small change to the `README.md` file. The change updates the
example code to use `await` with the `prompt.stream` method for proper
asynchronous handling.
---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 9ed7bf3..d904fc3 100644
--- a/README.md
+++ b/README.md
@@ -461,7 +461,7 @@ Works the same way as `prompt()`, but resolves with a `stream` key instead of a
 ```js
 import { prompt } from "@copilot-extensions/preview-sdk";
 
-const { requestId, stream } = prompt.stream("What is the capital of France?", {
+const { requestId, stream } = await prompt.stream("What is the capital of France?", {
   token: process.env.TOKEN,
 });