Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Anything Llm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
MachineLearning
Mintplex Labs
Anything Llm
Commits
0deb0a01
Unverified
Commit
0deb0a01
authored
6 months ago
by
Timothy Carambat
Committed by
GitHub
6 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Patch 11Labs selection UI bug (#2284)
* Patch 11Labs selection UI bug * remove log
parent
644a35a3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/src/components/TextToSpeech/ElevenLabsOptions/index.jsx
+10
-5
10 additions, 5 deletions
...d/src/components/TextToSpeech/ElevenLabsOptions/index.jsx
with
10 additions
and
5 deletions
frontend/src/components/TextToSpeech/ElevenLabsOptions/index.jsx
+
10
−
5
View file @
0deb0a01
...
...
@@ -3,7 +3,9 @@ import System from "@/models/system";
export
default
function
ElevenLabsOptions
({
settings
})
{
const
[
inputValue
,
setInputValue
]
=
useState
(
settings
?.
TTSElevenLabsKey
);
const
[
openAIKey
,
setOpenAIKey
]
=
useState
(
settings
?.
TTSElevenLabsKey
);
const
[
elevenLabsKey
,
setElevenLabsKey
]
=
useState
(
settings
?.
TTSElevenLabsKey
);
return
(
<
div
className
=
"flex gap-x-4"
>
...
...
@@ -21,11 +23,11 @@ export default function ElevenLabsOptions({ settings }) {
autoComplete
=
"off"
spellCheck
=
{
false
}
onChange
=
{
(
e
)
=>
setInputValue
(
e
.
target
.
value
)
}
onBlur
=
{
()
=>
set
OpenAI
Key
(
inputValue
)
}
onBlur
=
{
()
=>
set
ElevenLabs
Key
(
inputValue
)
}
/>
</
div
>
{
!
settings
?.
credentialsOnly
&&
(
<
ElevenLabsModelSelection
settings
=
{
settings
}
apiKey
=
{
openAI
Key
}
/>
<
ElevenLabsModelSelection
settings
=
{
settings
}
apiKey
=
{
elevenLabs
Key
}
/>
)
}
</
div
>
);
...
...
@@ -84,7 +86,6 @@ function ElevenLabsModelSelection({ apiKey, settings }) {
<
select
name
=
"TTSElevenLabsVoiceModel"
required
=
{
true
}
defaultValue
=
{
settings
?.
TTSElevenLabsVoiceModel
}
className
=
"bg-zinc-900 border-gray-500 text-white text-sm rounded-lg block w-full p-2.5"
>
{
Object
.
keys
(
groupedModels
)
...
...
@@ -92,7 +93,11 @@ function ElevenLabsModelSelection({ apiKey, settings }) {
.
map
((
organization
)
=>
(
<
optgroup
key
=
{
organization
}
label
=
{
organization
}
>
{
groupedModels
[
organization
].
map
((
model
)
=>
(
<
option
key
=
{
model
.
id
}
value
=
{
model
.
id
}
>
<
option
key
=
{
model
.
id
}
value
=
{
model
.
id
}
selected
=
{
model
.
id
===
settings
?.
TTSElevenLabsVoiceModel
}
>
{
model
.
name
}
</
option
>
))
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment