Skip to content

Commit

Permalink
fix(readme): add await to prompt.stream example (#112)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tspascoal authored Oct 5, 2024
1 parent 3743211 commit 4817827
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});

Expand Down

0 comments on commit 4817827

Please sign in to comment.