mirror of
https://github.com/hanzoai/flow.git
synced 2026-10-17 01:29:18 +00:00
17 lines
452 B
TypeScript
17 lines
452 B
TypeScript
import OpenAI from "openai";
|
|
|
|
const client = new OpenAI({
|
|
baseURL: "FLOW_SERVER_URL/v1/",
|
|
defaultHeaders: {
|
|
"x-api-key": "FLOW_API_KEY"
|
|
},
|
|
apiKey: "dummy-api-key" // Required by OpenAI SDK but not used by Flow
|
|
});
|
|
|
|
const response = await client.responses.create({
|
|
model: "FLOW_ID",
|
|
input: "There is an event that happens on the second wednesday of every month. What are the event dates in 2026?"
|
|
});
|
|
|
|
console.log(response.output_text);
|