Skip to content

Commit 12965eb

Browse files
authored
🐛 pass config path to completion message (#111)
* 🐛 pass config path to completion message * 🐛 add typing extension to bundled version - add a hint on what to do in case of errors * 🎨 format README
1 parent ec43047 commit 12965eb

File tree

4 files changed

+17
-12
lines changed

4 files changed

+17
-12
lines changed

.github/workflows/cdci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ jobs:
155155
- name: Build executable
156156
run: |
157157
cd gui
158-
pyinstaller -n vuegen_gui --onefile --windowed --collect-all pyvis --collect-all streamlit --collect-all st_aggrid --collect-all customtkinter --collect-all quarto_cli --collect-all plotly --collect-all _plotly_utils --collect-all traitlets --collect-all referencing --collect-all rpds --collect-all tenacity --collect-all pyvis --collect-all pandas --collect-all numpy --collect-all matplotlib --collect-all openpyxl --collect-all xlrd --collect-all nbformat --collect-all nbclient --collect-all altair --collect-all itables --collect-all kaleido --collect-all pyarrow --collect-all dataframe_image --collect-all narwhals --collect-all PIL --collect-all vl_convert --add-data ../docs/example_data/Basic_example_vuegen_demo_notebook:example_data/Basic_example_vuegen_demo_notebook --add-data ../docs/images/vuegen_logo.png:. app.py
158+
pyinstaller -n vuegen_gui --onefile --windowed --collect-all pyvis --collect-all streamlit --collect-all st_aggrid --collect-all customtkinter --collect-all quarto_cli --collect-all plotly --collect-all _plotly_utils --collect-all traitlets --collect-all referencing --collect-all rpds --collect-all tenacity --collect-all pandas --collect-all numpy --collect-all matplotlib --collect-all openpyxl --collect-all xlrd --collect-all nbformat --collect-all nbclient --collect-all altair --collect-all itables --collect-all kaleido --collect-all pyarrow --collect-all dataframe_image --collect-all narwhals --collect-all PIL --collect-all vl_convert --collect-all typing-extensions --add-data ../docs/example_data/Basic_example_vuegen_demo_notebook:example_data/Basic_example_vuegen_demo_notebook --add-data ../docs/images/vuegen_logo.png:. app.py
159159
# --windowed only for mac, see:
160160
# https://pyinstaller.org/en/stable/usage.html#building-macos-app-bundles
161161
# 'Under macOS, PyInstaller always builds a UNIX executable in dist.'

README.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ vuegen --directory docs/example_data/Earth_microbiome_vuegen_demo_notebook --rep
119119
Your input directory must follow a **nested folder structure**, where first-level folders are treated as **sections** and second-level folders as **subsections**, containing the components (plots, tables, networks, Markdown text, and HTML files).
120120

121121
Here is an example layout:
122+
122123
```
123124
report_folder/
124125
├── section1/
@@ -138,7 +139,7 @@ report_folder/
138139
> [!WARNING]
139140
> VueGen currently requires each section to contain at least one subsection folder. Defining only sections (with no subsections) or using deeper nesting levels (i.e., sub-subsections) will result in errors. In upcoming releases, we plan to support more flexible directory structures.
140141
141-
The titles for sections, subsections, and components are extracted from the corresponding folder and file names, and afterward, users can add descriptions, captions, and other details to the configuration file. Component types are inferred from the file extensions and names.
142+
The titles for sections, subsections, and components are extracted from the corresponding folder and file names, and afterward, users can add descriptions, captions, and other details to the configuration file. Component types are inferred from the file extensions and names.
142143
The order of sections, subsections, and components can be defined using numerical suffixes in folder and file names.
143144

144145
It's also possible to provide a configuration file instead of a directory:
@@ -206,6 +207,10 @@ from the releases page according to your operating system.
206207

207208
```bash
208209
conda create -n vuegen_gui -c conda-forge python=3.12 jupyter
210+
# in case you have errors, install vuegen addtionally
211+
conda activate vuegen_gui
212+
pip install vuegen
213+
# list all conda environments to find the location of the environment
209214
conda info -e # find environment location
210215
```
211216

@@ -254,28 +259,28 @@ This advanced case study demonstrates the application of VueGen in a real-world
254259
255260
**3. ChatBot Component**
256261

257-
This case study highlights VueGen’s capability to embed a chatbot component into a report subsection,
262+
This case study highlights VueGen’s capability to embed a chatbot component into a report subsection,
258263
enabling interactive conversations inside the report.
259264

260265
Two API modes are supported:
261266

262267
- **Ollama-style streaming chat completion**
263-
If a `model` parameter is specified in the config file, VueGen assumes the chatbot is using Ollama’s [/api/chat endpoint][ollama_chat].
264-
Messages are handled as chat history, and the assistant responses are streamed in real time for a smooth and responsive experience.
265-
This mode supports LLMs such as `llama3`, `deepsek`, or `mistral`.
268+
If a `model` parameter is specified in the config file, VueGen assumes the chatbot is using Ollama’s [/api/chat endpoint][ollama_chat].
269+
Messages are handled as chat history, and the assistant responses are streamed in real time for a smooth and responsive experience.
270+
This mode supports LLMs such as `llama3`, `deepsek`, or `mistral`.
266271

267272
> [!TIP]
268273
> See [Ollama’s website][ollama] for more details.
269274
270275
- **Standard prompt-response API**
271-
If no `model` is provided, VueGen uses a simpler prompt-response flow.
272-
A single prompt is sent to an endpoint, and a structured JSON object is expected in return.
273-
Currently, the response can include:
276+
If no `model` is provided, VueGen uses a simpler prompt-response flow.
277+
A single prompt is sent to an endpoint, and a structured JSON object is expected in return.
278+
Currently, the response can include:
274279
- `text`: the main textual reply
275280
- `links`: a list of source URLs (optional)
276281
- `HTML content`: an HTML snippet with a Pyvis network visualization (optional)
277282

278-
This response structure is currently customized for an internal knowledge graph assistant, but VueGen is being actively developed
283+
This response structure is currently customized for an internal knowledge graph assistant, but VueGen is being actively developed
279284
to support more flexible and general-purpose response formats in future releases.
280285

281286
> [!NOTE]

gui/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ bundle:
3737
--collect-all rpds \
3838
--collect-all tenacity \
3939
--collect-all vl_convert \
40+
--collect-all typing-extensions \
4041
--add-data ../docs/example_data/Basic_example_vuegen_demo_notebook:example_data/Basic_example_vuegen_demo_notebook \
4142
--add-data ../docs/images/vuegen_logo.png:. \
4243
app.py
@@ -80,7 +81,6 @@ bundle:
8081
# --collect-all urllib3 \
8182
# --collect-all uri-template \
8283
# --collect-all tzdata \
83-
# --collect-all typing-extensions\
8484
# --collect-all types-python-dateutil \
8585
# --collect-all traitlets \
8686
# --collect-all tornado \

gui/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def inner():
170170
f"\n\nConfiguration file at:\n{gen_config_path}",
171171
)
172172
global hash_config_app # ! fix this
173-
get_completion_message(report_type.get())
173+
get_completion_message(report_type.get(), config_path=gen_config_path)
174174
if hash(yaml.dump(config_app)) != hash_config_app:
175175
with open(config_file, "w", encoding="utf-8") as f:
176176
yaml.dump(config_app, f)

0 commit comments

Comments
 (0)