You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: dreamcode.md
+117-1
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,12 @@ Please, any questions/feedback/feelings are welcome. This is a safe space. Pleas
10
10
- Automated Payload verification
11
11
- High-level APIs for different types of responses (text, confirmation, references, etc.)
12
12
- High-level API for interacting with models
13
+
- High-level API for function calls
14
+
- High-level API for requesting user confirmation before a function is called
13
15
14
-
## API
16
+
## Examples
17
+
18
+
### Tell a joke
15
19
16
20
```js
17
21
import { createServer } from"http";
@@ -65,6 +69,118 @@ copilotExtension.on(
65
69
awaitrespond.text("Hmm, something went wrong. Please try again later.");
66
70
}
67
71
);
72
+
```
73
+
74
+
### Book a flight
75
+
76
+
I'm using [@daveebbelaar](https://github.com/daveebbelaar)'s example of a flight booking agent that they demonstrate at https://www.youtube.com/watch?v=aqdWSYWC_LI
77
+
78
+
```js
79
+
import { createServer } from"http";
80
+
81
+
import {
82
+
CopilotExtension,
83
+
createNodeMiddleware,
84
+
} from"@octokit/copilot-extension";
85
+
86
+
constcopilotExtension=newCopilotExtension({
87
+
userAgent:"book-a-flight",
88
+
89
+
// TBD: are we supporting a default model? Globally, or for an enterprise/organization/user?
90
+
model: {
91
+
// either "gpt-3.5-turbo" or "gpt-4". Maybe "default" if we support that server-side or want to support that in the SDK?
0 commit comments