-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
142 lines (127 loc) · 7.04 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LibreTools AI Assistant Plugin Documentation</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<h1>LibreTools AI Assistant Plugin Documentation</h1>
<div class="intro">
<p>The primary goal of LibreTools is to seamlessly integrate a program called LMStudio into LibreOffice, allowing users to run large language models (LLMs) locally on their machines. LMStudio will utilise the local computer's GPU to efficiently process and serve these models. To ensure smooth operation and easy access, LibreTools will feature a user-friendly GUI that connects directly to the LLM's IP address. This connection can be established either through the local intranet or using a service like ngrok for remote access.</p>
<p>By leveraging local hardware and providing a straightforward interface, LibreTools aims to make advanced AI capabilities accessible to all users, without the need for expensive cloud services or complex setup procedures. This approach not only enhances the functionality of LibreOffice but also ensures that users maintain control over their data and resources, aligning with the principles of privacy and open-source development.</p>
</div>
<h2>Installation instructions</h2>
<!--Windows installation -->
<h3>Windows</h3>
<div class="step">
<h4>Step 1: Install LM Studio</h4>
<p>Download and install LM Studio from <a href="https://releases.lmstudio.ai/win32/x86/0.3.2/2/LM-Studio-0.3.2-Setup.exe">this link</a>.</p>
</div>
<div class="step">
<h4>Step 2: Download the LLM Model</h4>
<p>Download the required LLM model. <a href="https://lmstudio.ai/docs/basics/download-model">this link</a></p>
</div>
<div class="step">
<h4>Step 3: Download LibreOffice</h4>
<p>Download and install LibreOffice from <a href="https://www.libreoffice.org/download/download-libreoffice/">the official LibreOffice website</a>.</p>
</div>
<div class="step">
<h4>Step 4: Clone the Repository</h4>
<ol>
<li>Open a Terminal or Command Prompt.</li>
<li>Navigate to the directory where you want to clone the project using the <code>cd</code> command. For example: <code>cd ~</code></li>
<li>Clone the repository using the following command :
<br><code>git clone https://dagshub.com/Omdena/NorthCarolinaUSAChapter_LibreToolsAIAssistantPlugin.git</code></li>
</ol>
</div>
<div class="step">
<h4>Step 5: Copy the Python Script</h4>
<p>Run the following command in the command line :</p>
<code>copy "C:\Path\To\Your\scriptlocatepython.py" "C:\Program Files\LibreOffice\share\Scripts\python"</code>
</div>
<div class="step">
<h4>Step 6: Load the Dialog File</h4>
<ol>
<li>Open LibreOffice and create a new file.</li>
<li>In the navigation bar, go to Tools > Macros > Organize Dialogs.</li>
<li>Select "Libraries" and click "Edit".</li>
<li>Go to File (in navbar) > Import Dialog.</li>
<ul class="image-list">
a
<li><a href="1.png" target="_blank"><img src="1.png" alt="Image 1"></a></li>
<li><a href="2.png" target="_blank"><img src="2.png" alt="Image 2"></a></li>
<li><a href="3.png" target="_blank"><img src="3.png" alt="Image 3"></a></li>
</ul>
</ol>
</div>
<div class="step">
<h4>Step 7: Run LM Studio Server</h4>
<p>Open LM Studio and start the server.</p>
<a href="4.png" target="_blank"><img class="image" src="4.png" alt="Image 4"></a>
</div>
<div class="step">
<h4>Step 8: Run the Macro</h4>
<p>In LibreOffice, go to Tools > Macros > Run Macro > script locate python > Main</p>
<ul class="image-list">
a
<li><a href="5.png" target="_blank"><img src="5.png" alt="Image 5"></a></li>
</ul>
</div>
<!-- Ubuntu -->
<h3>Ubuntu</h3>
<div class="step">
<h4>Step 1: Install LM Studio.</h4>
<p>Download and install LM Studio following the instructions for your operating system from the <a href="https://lmstudio.ai/">link</a>.</p>
</div>
<div class="step">
<h4>(Step 2): Download and install Libre Office.</h4>
<p>If not already installed, download and install Libre Office from the <a href="https://www.libreoffice.org/download/download-libreoffice/">link.</a></p>
</div>
<div class="step">
<h4>(Step 3): Ensure Libre Office can run Python scripts.</h4>
<p>Open Libre Office Writer and ensure that <i>Tools > Macros > Organize Macros > Python </i> exists.
If it does not exist, install <i>libreoffice-script-provider-python</i> by running:</p>
<code>sudo apt-get install libreoffice-script-provider-python</code>
</div>
<div class="step">
<h4>Step 4: Clone the repository.</h4>
<p>
<ol>
<li>In terminal, navigate to the directory where you want to clone the project.</li>
<li>Clone the repository:
<br><code>git clone https://dagshub.com/Omdena/NorthCarolinaUSAChapter_LibreToolsAIAssistantPlugin.git</code></li>
</ol>
</div>
</p>
</div>
<div class="step">
<h4>Step 5: Copy the Python script.</h4>
<p>Copy the Python script to the Libre Office shared folder:</p>
<code>sudo cp path/to/your/script/scriptlocatepython.py /usr/lib/libreoffice/share/Scripts/python</code>
</div>
<div class="step">
<h4>Step 6: Load the dialog file.</h4>
<ol>
<li>Open LibreOffice Writer and create a new file.</li>
<li>Navigate to <i>Tools > Macros > Organize Dialogs</i>.</li>
<li>Select <i>Dialogs > Libraries</i> and click <i>Edit</i>, which opens a new window.</li>
<li>Navigate to <i>File > Import Dialog </i> and open <i>MyDialog.xdl</i> file from the <i>NorthCarolinaUSAChapter_LibreToolsAIAssistantPlugin</i> folder.</li>
</ol>
</div>
<div class="step">
<h4>Step 7: Download the model.</h4>
<p>Open LM Studio, navigate to the <i>Discover</i> tab and download the model you wish to use.</p>
</div>
<div class="step">
<h4>Step 8: Run LM Studio Server.</h4>
<p>In LM Studio, navigate to the <i>Developer</i> tab. Select the model to load and start the server.</p>
</div>
<div class="step">
<h4>Step 8: Run the Macro.</h4>
<p>In LibreOffice Writer, navigate to <i>Tools > Macros > Run Macro... > My Macros > scripttolocatepython > main</i>.
This action opens a new dialog with the promt and instruction options.</p>
</div>
</body>
</html>