-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add LLM support for Google Gemini-Pro (#492)
resolves #489
- Loading branch information
1 parent
26549df
commit 24227e4
Showing
18 changed files
with
371 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
frontend/src/components/LLMSelection/GeminiLLMOptions/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
export default function GeminiLLMOptions({ settings }) { | ||
return ( | ||
<div className="w-full flex flex-col"> | ||
<div className="w-full flex items-center gap-4"> | ||
<div className="flex flex-col w-60"> | ||
<label className="text-white text-sm font-semibold block mb-4"> | ||
Google AI API Key | ||
</label> | ||
<input | ||
type="password" | ||
name="GeminiLLMApiKey" | ||
className="bg-zinc-900 text-white placeholder-white placeholder-opacity-60 text-sm rounded-lg focus:border-white block w-full p-2.5" | ||
placeholder="Google Gemini API Key" | ||
defaultValue={settings?.GeminiLLMApiKey ? "*".repeat(20) : ""} | ||
required={true} | ||
autoComplete="off" | ||
spellCheck={false} | ||
/> | ||
</div> | ||
|
||
<div className="flex flex-col w-60"> | ||
<label className="text-white text-sm font-semibold block mb-4"> | ||
Chat Model Selection | ||
</label> | ||
<select | ||
name="GeminiLLMModelPref" | ||
defaultValue={settings?.GeminiLLMModelPref || "gemini-pro"} | ||
required={true} | ||
className="bg-zinc-900 border border-gray-500 text-white text-sm rounded-lg block w-full p-2.5" | ||
> | ||
{["gemini-pro"].map((model) => { | ||
return ( | ||
<option key={model} value={model}> | ||
{model} | ||
</option> | ||
); | ||
})} | ||
</select> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.