-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
add openai env variables #826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
8271e55
1dfdd28
2049f56
6806924
3d26614
e1486f7
9a762c9
d610117
61d2d6c
035add7
0a48277
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -32,14 +32,12 @@ interface WorkflowChannelsState { | |||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
const model = new ChatOpenAI({ | ||||||||||||||||||||||||||||||||||||||||||
apiKey: process.env.OPENAI_API_KEY || 'sk-proj-', | ||||||||||||||||||||||||||||||||||||||||||
model: 'gpt-4.1', | ||||||||||||||||||||||||||||||||||||||||||
model: process.env.OPENAI_TEXT_MODEL || 'gpt-4.1', | ||||||||||||||||||||||||||||||||||||||||||
temperature: 0.7, | ||||||||||||||||||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
const dalle = new DallEAPIWrapper({ | ||||||||||||||||||||||||||||||||||||||||||
apiKey: process.env.OPENAI_API_KEY || 'sk-proj-', | ||||||||||||||||||||||||||||||||||||||||||
model: 'gpt-image-1', | ||||||||||||||||||||||||||||||||||||||||||
model: process.env.OPENAI_IMAGE_MODEL || 'gpt-image-1', | ||||||||||||||||||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||||||||||||||||||
Comment on lines
34
to
41
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix invalid model names in both ChatOpenAI and DallEAPIWrapper. Both fallback model names are invalid:
Apply this diff to use valid model names: - model: process.env.OPENAI_TEXT_MODEL || 'gpt-4.1',
+ model: process.env.OPENAI_TEXT_MODEL || 'gpt-4', - model: process.env.OPENAI_IMAGE_MODEL || 'gpt-image-1',
+ model: process.env.OPENAI_IMAGE_MODEL || 'dall-e-3', 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
const generateContent = z.object({ | ||||||||||||||||||||||||||||||||||||||||||
|
Uh oh!
There was an error while loading. Please reload this page.