Skip to content

Commit

Permalink
Fix horde key reset (#1097)
Browse files Browse the repository at this point in the history
  • Loading branch information
sceuick authored Dec 19, 2024
1 parent ee45b6e commit 532dd0a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
6 changes: 5 additions & 1 deletion srv/adapter/agnaistic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,14 @@ export const handleAgnaistic: ModelAdapter = async function* (opts) {

log.debug(`Prompt:\n${prompt}`)

let params = [`type=text`, `id=${opts.user._id}`, `model=${subPreset.subModel}`, `level=${level}`]
const [submodel, override] = subPreset.subModel.split(',')

let params = [`type=text`, `id=${opts.user._id}`, `model=${submodel}`, `level=${level}`]
.filter((p) => !!p)
.join('&')

body.model_override = override

const resp = gen.streamResponse
? await websocketStream({
url: `${subPreset.subServiceUrl || subPreset.thirdPartyUrl}/api/v1/stream?${params}`,
Expand Down
5 changes: 4 additions & 1 deletion web/pages/Chat/components/InputBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,10 @@ const InputBar: Component<{
<Button
schema="secondary"
class="w-full"
onClick={() => msgStore.selfGenerate()}
onClick={() => {
setMenu(false)
msgStore.selfGenerate()
}}
alignLeft
disabled={!ctx.impersonate}
>
Expand Down
1 change: 0 additions & 1 deletion web/pages/Settings/components/HordeAISettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ const HordeAISettings: Component<{
props.state.hordeName || props.state.hordeKey ? 'API key has been verified' : ''
}
type="password"
value={props.state.hordeKey}
onChange={(ev) => props.setter('hordeKey', ev.currentTarget.value)}
/>

Expand Down
2 changes: 1 addition & 1 deletion web/shared/PresetSettings/Sliders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export const SliderSettings: Component<PresetTabProps> = (props) => {
<RangeInput
label="Base"
min={0}
max={1}
max={6}
step={0.01}
value={props.state.dryBase ?? 0}
disabled={props.state.disabled}
Expand Down

0 comments on commit 532dd0a

Please sign in to comment.