Skip to content

Commit

Permalink
Add "Tools" tab to cloud preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
rhennigan committed Jan 22, 2024
1 parent 5786fb4 commit de73e2f
Show file tree
Hide file tree
Showing 3 changed files with 286 additions and 63 deletions.
6 changes: 1 addition & 5 deletions Source/Chatbook/PreferencesContent.wl
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ $inFrontEndScope := MatchQ[ OwnValues @ $preferencesScope, { _ :> $FrontEnd|_Fr
(* ::**************************************************************************************************************:: *)
(* ::Subsection::Closed:: *)
(*Cloud Overrides*)
$displayedPreferencesPages :=
If[ $CloudEvaluation,
{ "Notebooks", "Services", "Personas"(*, "Tools"*) },
$preferencesPages
];
$displayedPreferencesPages := $preferencesPages;

(* ::**************************************************************************************************************:: *)
(* ::Section::Closed:: *)
Expand Down
6 changes: 5 additions & 1 deletion Source/Chatbook/Settings.wl
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ $defaultChatSettings = <|
"Model" :> $DefaultModel,
"Multimodal" -> Automatic,
"NotebookWriteMethod" -> Automatic,
"OpenAIKey" -> Automatic, (* TODO: remove this once LLMServices is widely available *)
"OpenAIAPICompletionURL" -> "https://api.openai.com/v1/chat/completions",
"OpenAIKey" -> Automatic, (* TODO: remove this once LLMServices is widely available *)
"PresencePenalty" -> 0.1,
"ProcessingFunctions" :> $DefaultChatProcessingFunctions,
"Prompts" -> { },
Expand All @@ -60,6 +60,7 @@ $defaultChatSettings = <|
"ToolCallFrequency" -> Automatic,
"ToolOptions" :> $DefaultToolOptions,
"Tools" -> Automatic,
"ToolSelectionType" -> <| |>,
"ToolsEnabled" -> Automatic,
"TopP" -> 1,
"TrackScrollingWhenPlaced" -> Automatic,
Expand Down Expand Up @@ -105,6 +106,9 @@ $DefaultChatProcessingFunctions = <|
(* ::**************************************************************************************************************:: *)
(* ::Section::Closed:: *)
(*CurrentChatSettings*)

(* TODO: need to support something like CurrentChatSettings[scope, {"key1", "key2", ...}] for nested values *)

GeneralUtilities`SetUsage[ CurrentChatSettings, "\
CurrentChatSettings[obj$, \"key$\"] gives the current chat settings for the CellObject or NotebookObject obj$ for the specified key.
CurrentChatSettings[obj$] gives all current chat settings for obj$.
Expand Down
Loading

0 comments on commit de73e2f

Please sign in to comment.