Skip to content

Commit 67e9be0

Browse files
committed
adding JS sample
1 parent ea3ca62 commit 67e9be0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

articles/ai-services/agents/how-to/tools/bing-grounding.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,22 @@ ThreadMessage message = agentClient.CreateMessage(
290290
"How does wikipedia explain Euler's Identity?");
291291
```
292292

293+
# [JavaScript](#javascript)
294+
295+
```javascript
296+
// create a thread
297+
const thread = await client.agents.createThread();
298+
299+
// add a message to thread
300+
await client.agents.createMessage(
301+
thread.id, {
302+
role: "user",
303+
content: "What is the weather in Seattle?",
304+
});
305+
```
306+
293307
# [REST API](#tab/rest)
308+
294309
### Create a thread
295310

296311
```console

0 commit comments

Comments
 (0)