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: README.md
+29Lines changed: 29 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,35 @@ for await (const chunk of streamResponse) {
57
57
58
58
The `AI21` class provides a `chat` property that gives you access to the Chat API. You can use this to generate text, complete prompts, and more.
59
59
60
+
### Files
61
+
62
+
63
+
The `AI21` class provides a `files` property that gives you access to the Files API. You can use this to upload files to the AI21 Studio. These files will be used as context for the conversational-rag engine.
64
+
65
+
66
+
```typescript
67
+
import { AI21 } from'ai21';
68
+
69
+
const client =newAI21({
70
+
apiKey: process.env.AI21_API_KEY, // or pass it in directly
0 commit comments