Spaces:
Running
Running
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import OpenAI from "openai";
|
2 |
+
const openai = new OpenAI();
|
3 |
+
const completion = await openai.chat.completions.create({
|
4 |
+
model: "gpt-4o",
|
5 |
+
store: true,
|
6 |
+
messages: [
|
7 |
+
{"role": "user", "content": "write a haiku about ai"}
|
8 |
+
]
|
9 |
+
});
|