Skip to content

Commit 87764c2

Browse files
authored
Merge pull request #972 from WolframResearch/feature/InstallVectorDatabases
Added `InstallVectorDatabases` as exported symbol
2 parents fce190d + b0b2f4f commit 87764c2

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

PacletInfo.wl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PacletObject[ <|
22
"Name" -> "Wolfram/Chatbook",
33
"PublisherID" -> "Wolfram",
4-
"Version" -> "1.5.2.21",
4+
"Version" -> "1.5.2.22",
55
"WolframVersion" -> "14.1+",
66
"Description" -> "Wolfram Notebooks + LLMs",
77
"License" -> "MIT",

Source/Chatbook/Main.wl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ BeginPackage[ "Wolfram`Chatbook`" ];
6666
`GetExpressionURIs;
6767
`GetFocusedNotebook;
6868
`InlineTemplateBoxes;
69+
`InstallVectorDatabases;
6970
`InvalidateServiceCache;
7071
`ListSavedChats;
7172
`LoadChat;
@@ -232,6 +233,7 @@ $ChatbookProtectedNames = "Wolfram`Chatbook`" <> # & /@ {
232233
"GetExpressionURIs",
233234
"GetFocusedNotebook",
234235
"InlineTemplateBoxes",
236+
"InstallVectorDatabases",
235237
"ListSavedChats",
236238
"LoadChat",
237239
"LogChatTiming",

Source/Chatbook/PromptGenerators/VectorDatabases.wl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,21 @@ $$vectorDatabase = HoldPattern[ _VectorDatabaseObject? System`Private`ValidQ ];
6565
$vectorDBSearchCache = <| |>;
6666
$embeddingCache = <| |>;
6767

68+
(* ::**************************************************************************************************************:: *)
69+
(* ::Section::Closed:: *)
70+
(*InstallVectorDatabases*)
71+
InstallVectorDatabases // beginDefinition;
72+
73+
InstallVectorDatabases[ ] := catchMine @ Enclose[
74+
Success[
75+
"VectorDatabasesInstalled",
76+
<| "Location" -> ConfirmBy[ getVectorDBDirectory[ ], vectorDBDirectoryQ, "Location" ] |>
77+
],
78+
throwInternalFailure
79+
];
80+
81+
InstallVectorDatabases // endExportedDefinition;
82+
6883
(* ::**************************************************************************************************************:: *)
6984
(* ::Section::Closed:: *)
7085
(*Vector Database Utilities*)

0 commit comments

Comments
 (0)