Skip to content

Commit

Permalink
Only show the custom API endpoint input when it would have an effect
Browse files Browse the repository at this point in the history
  • Loading branch information
rhennigan committed Nov 20, 2023
1 parent c8f414e commit d68439e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Source/Chatbook/UI.wl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Needs[ "Wolfram`Chatbook`Models`" ];
Needs[ "Wolfram`Chatbook`Personas`" ];
Needs[ "Wolfram`Chatbook`PreferencesUtils`" ];
Needs[ "Wolfram`Chatbook`Serialization`" ];
Needs[ "Wolfram`Chatbook`Services`" ];
Needs[ "Wolfram`Chatbook`Settings`" ];
Needs[ "Wolfram`Chatbook`Utils`" ];

Expand Down Expand Up @@ -578,6 +579,7 @@ makeTemperatureSlider[
BaseStyle -> { FontSize -> 12 }
]

(* cSpell: ignore AIAPI *)
makeOpenAIAPICompletionURLForm[value_]:= Pane[
InputField[value,
String,
Expand Down Expand Up @@ -710,7 +712,9 @@ makeFrontEndAndNotebookSettingsContent[
]
}, Spacer[3]]},

{Row[{
If[ TrueQ @ $useLLMServices,
Nothing,
{Row[{
tr["Chat Completion URL:"],
makeOpenAIAPICompletionURLForm[
Dynamic[
Expand All @@ -723,7 +727,7 @@ makeFrontEndAndNotebookSettingsContent[
)
]
]
}, Spacer[3]]},
}, Spacer[3]]}],
{
labeledCheckbox[
Dynamic[
Expand Down

0 comments on commit d68439e

Please sign in to comment.