You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
The project template is designed to support multiple models, but the function generateTitleFromUserMessage creates a dependency on the gpt-4o-mini model. This causes the application to throw an error if the gpt-4o-mini model is not being used.
Error Message:
When using the Gemini model exclusively, the following error is received: url: 'https://generativelanguage.googleapis.com/v1beta/models/gpt-4o-mini:generateContent',.
Code:
app/(chat)/actions.ts=>exportasyncfunctiongenerateTitleFromUserMessage({ message }: {message: Message;}){const{text: title}=awaitgenerateText({model: customModel('gpt-4o-mini'),system: ` - you will generate a short title based on the first message a user begins a conversation with - ensure it is not more than 80 characters long - the title should be a summary of the user's message - do not use quotes or colons`,prompt: JSON.stringify(message),});returntitle;}
Steps to Reproduce:
Without gpt-4o-mini in models ,send a message to initiate a conversation.
Observe the error triggered by the dependency on gpt-4o-mini.
Expected Behavior:
The template should support multiple models without errors, adapting seamlessly to the available model (e.g., Gemini).
Actual Behavior:
The function explicitly relies on gpt-4o-mini, causing the application to fail when this model is unavailable.
Thank you!
The text was updated successfully, but these errors were encountered:
Yeah. I used cursor to fix this. I removed all hardcoded model names and just use available model from models.ts file.
If you want to remove all openai models, it would break Image generation thing we have in the document tool too.
Its depends again on openai api.
#739 Pull Request
Description:
The project template is designed to support multiple models, but the function
generateTitleFromUserMessage
creates a dependency on thegpt-4o-mini
model. This causes the application to throw an error if thegpt-4o-mini
model is not being used.Error Message:
When using the Gemini model exclusively, the following error is received:
url: 'https://generativelanguage.googleapis.com/v1beta/models/gpt-4o-mini:generateContent',
.Code:
Steps to Reproduce:
gpt-4o-mini
.Expected Behavior:
The template should support multiple models without errors, adapting seamlessly to the available model (e.g., Gemini).
Actual Behavior:
The function explicitly relies on
gpt-4o-mini
, causing the application to fail when this model is unavailable.Thank you!
The text was updated successfully, but these errors were encountered: