Files
langflow/docs/versioned_docs/version-1.10.0/API-Reference/javascript-examples/api-openai-responses/additional-configuration-for-openai-client-libraries.ts
Mendon Kissling 2411d8036e docs: build OpenAPI spec and cut version 1.10 (#13537)
* build-api

* bump-version-to-1.10

* fix-broken-links
2026-06-08 18:25:14 +00:00

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);