mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-25 00:59:07 +08:00
* version-1.9.0-docs * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
17 lines
468 B
TypeScript
17 lines
468 B
TypeScript
import OpenAI from "openai";
|
|
|
|
const client = new OpenAI({
|
|
baseURL: "LANGFLOW_SERVER_URL/api/v1/",
|
|
defaultHeaders: {
|
|
"x-api-key": "LANGFLOW_API_KEY"
|
|
},
|
|
apiKey: "dummy-api-key" // Required by OpenAI SDK but not used by Langflow
|
|
});
|
|
|
|
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);
|