Skip to content

Commit

Permalink
Merge pull request #916 from WolframResearch/feature/always-use-llmki…
Browse files Browse the repository at this point in the history
…t-for-na

Ensure correct model/service is always used for Notebook Assistance
  • Loading branch information
rhennigan authored Nov 14, 2024
2 parents 07fdb70 + 607038e commit 7baa317
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Source/Chatbook/ChatModes/ContentSuggestions.wl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Needs[ "Wolfram`Chatbook`ChatModes`Common`" ];
(* ::**************************************************************************************************************:: *)
(* ::Section::Closed:: *)
(*Configuration*)
$suggestionsService := If[ TrueQ @ $llmKit && StringQ @ $llmKitService, $llmKitService, "OpenAI" ];
$suggestionsAuthentication := If[ TrueQ @ $llmKit, "LLMKit", Automatic ];
$suggestionsService := $llmKitService;
$suggestionsAuthentication := "LLMKit";
$stripWhitespace = True;
$defaultWLContextString = "";
$finishReason = None;
Expand Down
1 change: 1 addition & 0 deletions Source/Chatbook/ChatModes/ShowNotebookAssistance.wl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ $workspaceChatWidth := $workspaceChatWidth = Switch[ $OperatingSystem, "MacOSX",
$notebookAssistanceBaseSettings = <|
"AppName" -> "NotebookAssistance",
"LLMEvaluator" -> "NotebookAssistant",
"Model" -> <| "Service" -> "LLMKit", "Name" -> Automatic |>,
"PromptGenerators" -> { "RelatedDocumentation" },
"ServiceCaller" -> "NotebookAssistance",
"ToolOptions" -> <| "WolframLanguageEvaluator" -> <| "AppendURIPrompt" -> True, "Method" -> "Session" |> |>,
Expand Down
3 changes: 2 additions & 1 deletion Source/Chatbook/Services.wl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ $ContextAliases[ "llm`" ] = "LLMServices`";
(*Configuration*)
$llmKit := $llmKit = $VersionNumber >= 14.1;
$llmKitService := LogChatTiming @ getLLMKitService[ ];
$fallbackLLMKitService = "AzureOpenAI";
$allowConnectionDialog = True;
$enableLLMServices = Automatic;
$modelListCache = <| |>;
Expand Down Expand Up @@ -57,7 +58,7 @@ getLLMKitService // beginDefinition;
getLLMKitService[ ] := (LLMSynthesize; getLLMKitService @ Wolfram`LLMFunctions`Common`$LLMKitInfo);
getLLMKitService[ KeyValuePattern[ "currentProvider" -> service_String ] ] := service;
getLLMKitService[ None ] := getUpdatedLLMKitService[ ];
getLLMKitService[ _ ] := None;
getLLMKitService[ _ ] := $fallbackLLMKitService;
getLLMKitService // endDefinition;

(* ::**************************************************************************************************************:: *)
Expand Down

0 comments on commit 7baa317

Please sign in to comment.