-
Notifications
You must be signed in to change notification settings - Fork 2.7k
change Gemini model #150
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?
change Gemini model #150
Changes from all commits
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 |
---|---|---|
|
@@ -26,7 +26,7 @@ export const InputForm: React.FC<InputFormProps> = ({ | |
}) => { | ||
const [internalInputValue, setInternalInputValue] = useState(""); | ||
const [effort, setEffort] = useState("medium"); | ||
const [model, setModel] = useState("gemini-2.5-flash-preview-04-17"); | ||
const [model, setModel] = useState("gemini-2.5-flash"); | ||
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. |
||
|
||
const handleInternalSubmit = (e?: React.FormEvent) => { | ||
if (e) e.preventDefault(); | ||
|
@@ -144,15 +144,15 @@ export const InputForm: React.FC<InputFormProps> = ({ | |
</div> | ||
</SelectItem> | ||
<SelectItem | ||
value="gemini-2.5-flash-preview-04-17" | ||
value="gemini-2.5-flash" | ||
className="hover:bg-neutral-600 focus:bg-neutral-600 cursor-pointer" | ||
> | ||
<div className="flex items-center"> | ||
<Zap className="h-4 w-4 mr-2 text-orange-400" /> 2.5 Flash | ||
</div> | ||
</SelectItem> | ||
<SelectItem | ||
value="gemini-2.5-pro-preview-05-06" | ||
value="gemini-2.5-pro" | ||
className="hover:bg-neutral-600 focus:bg-neutral-600 cursor-pointer" | ||
> | ||
Comment on lines
146
to
157
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. Hardcoding model names as string literals here and for the default model state on line 29 can lead to inconsistencies and makes maintenance difficult. If a model name changes, it needs to be updated in multiple places, which is error-prone. Consider defining the available models as a data structure, like an array of objects, and then dynamically generating these |
||
<div className="flex items-center"> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This model name is hardcoded. While this is an example script, it's a good practice to define such values as constants to improve readability and maintainability, especially if the value might be used elsewhere or change in the future.