Skip to content

Commit c476929

Browse files
build(deps): Bump glob and minizlib in /intelligence/ts/examples/nextjs-web-chats (#6145)
Co-authored-by: Charles Beauville <charles@flower.ai>
1 parent 4e78b0e commit c476929

File tree

10 files changed

+103
-434
lines changed

10 files changed

+103
-434
lines changed

dev/pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ docstrfmt = { git = "https://github.com/charlesbvll/docstrfmt.git", branch = "pa
4444

4545
[tool.docstrfmt]
4646
extend_exclude = [
47-
"../intelligence/docs/source/ts-ref-api/*",
48-
"../intelligence/docs/source/swift-ref-api/*",
49-
"../intelligence/docs/source/_templates/autosummary/*",
50-
"../intelligence/docs/source/conf.py",
47+
"**/ts-ref-api/*",
48+
"**/swift-ref-api/*",
49+
"**/conf.py",
50+
"**/_templates/autosummary/*",
5151
]
5252

5353
[tool.isort]

intelligence/dev/format-docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
set -e
33
cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../../
44

5-
docstrfmt intelligence/docs/source
5+
docstrfmt intelligence/docs/source -x "**/_templates/autosummary"

intelligence/docs/source/_templates/autosummary/base.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
.. currentmodule:: {{ module }}
44

55
.. auto{{ objtype }}:: {{ objname }}
6+

intelligence/docs/source/_templates/autosummary/class.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@
3131
{%- endfor %}
3232
{% endif %}
3333
{% endblock %}
34+

intelligence/docs/source/_templates/autosummary/module.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,4 @@
6464
{%- endfor %}
6565
{% endif %}
6666
{% endblock %}
67+

intelligence/docs/source/contributor-how-to-build-from-source.rst

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
Build from source
2-
=================
1+
###################
2+
Build from source
3+
###################
34

45
This concise guide explains how to build the Flower Intelligence TypeScript SDK from
56
source. It also explains how to install and use ``pnpm`` as your package manager.
67

7-
Prerequisites
8-
-------------
8+
***************
9+
Prerequisites
10+
***************
911

1012
- ``git`` and ``Node.js`` must be installed.
1113
- A working Internet connection for installing dependencies.
1214

13-
Installing ``pnpm``
14-
-------------------
15+
*********************
16+
Installing ``pnpm``
17+
*********************
1518

1619
You can install ``pnpm`` globally using npm. Open your terminal and run:
1720

@@ -26,8 +29,9 @@ pnpm with:
2629
2730
corepack enable pnpm
2831
29-
Setting up the repo
30-
-------------------
32+
*********************
33+
Setting up the repo
34+
*********************
3135

3236
If you already have the Flower repository cloned somewhere, you can skip this step and
3337
navigate to it and run ``git pull``.
@@ -39,8 +43,9 @@ navigate to it and run ``git pull``.
3943
git clone https://github.com/adap/flower.git
4044
cd flower/
4145
42-
Building from source
43-
--------------------
46+
**********************
47+
Building from source
48+
**********************
4449

4550
1. **Navigate to the TypeScript SDK:**
4651

intelligence/docs/source/how-to-use-crc.rst

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
Use Flower Confidential Remote Compute
2-
======================================
1+
########################################
2+
Use Flower Confidential Remote Compute
3+
########################################
34

45
To use Flower Confidential Remote Compute you must first subscribe from the `Flower
56
Intelligence page <https://flower.ai/intelligence>`_.
67

7-
Obtain your API key
8-
-------------------
8+
*********************
9+
Obtain your API key
10+
*********************
911

1012
Once you are connected and have a valid subscription, you can navigate to the `Projects
1113
page <https://flower.ai/intelligence/projects>`_.
@@ -97,8 +99,9 @@ process:
9799
.. image:: /_static/signup/api-key-created-dashboard.png
98100
:alt: API keys dashboard with key
99101

100-
Use your API key
101-
----------------
102+
******************
103+
Use your API key
104+
******************
102105

103106
Once all of this is done, you can use your API key in your application code to enable
104107
Flower Confidential Remote Compute.

intelligence/docs/source/index.rst

Lines changed: 45 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
Flower Intelligence
2-
===================
1+
#####################
2+
Flower Intelligence
3+
#####################
34

45
.. note::
56

@@ -13,8 +14,9 @@ Friendly Federated AI Framework <https://flower.ai>`_.
1314

1415
We currently provide SDKs for TypeScript/JavaScript, Kotlin, and Swift.
1516

16-
Install
17-
-------
17+
*********
18+
Install
19+
*********
1820

1921
.. tab-set::
2022
:sync-group: category
@@ -52,8 +54,9 @@ Install
5254
# Add Flower Intelligence dependency to your build.gradle.kts
5355
implementation("ai.flower:intelligence:0.1.8")
5456
55-
Hello, Flower Intelligence!
56-
---------------------------
57+
*****************************
58+
Hello, Flower Intelligence!
59+
*****************************
5760

5861
Flower Intelligence is built around the Singleton design pattern, meaning you only need
5962
to configure a single instance that can be reused throughout your project. This simple
@@ -136,8 +139,9 @@ setup helps you integrate powerful AI capabilities with minimal overhead.
136139
}
137140
}
138141
139-
Specify the model
140-
-----------------
142+
*******************
143+
Specify the model
144+
*******************
141145

142146
By specifying a model in the chat options, you can easily switch between different AI
143147
models available in the ecosystem. For a full list of supported models, please refer to
@@ -228,8 +232,9 @@ the :doc:`available models list <ref-models>`.
228232
}
229233
}
230234
231-
Check for errors
232-
----------------
235+
******************
236+
Check for errors
237+
******************
233238

234239
Instead of throwing exceptions that might crash your application, Flower Intelligence
235240
returns a response object that includes a dedicated :doc:`Failure
@@ -329,8 +334,9 @@ application stability.
329334
}
330335
}
331336
332-
Stream Responses
333-
----------------
337+
******************
338+
Stream Responses
339+
******************
334340

335341
By enabling the stream option and providing a callback function, you can watch the AI’s
336342
response as it is being generated. This approach is ideal for interactive applications,
@@ -444,8 +450,9 @@ available. The callback function must accept an argument of type :doc:`StreamEve
444450
}
445451
}
446452
447-
Use Roles
448-
---------
453+
***********
454+
Use Roles
455+
***********
449456

450457
Instead of simply sending a single string, you can provide an array of :doc:`messages
451458
<ts-api-ref/interfaces/Message>` with designated roles such as ``system`` and ``user``.
@@ -571,8 +578,9 @@ ensuring that the assistant responds in a way that’s tailored to the scenario.
571578
}
572579
}
573580
574-
Handle history
575-
--------------
581+
****************
582+
Handle history
583+
****************
576584

577585
In this example, the conversation history is maintained in an array that includes both
578586
system and user messages. Each time a new message is sent, it is appended to the
@@ -751,8 +759,9 @@ interactions, resulting in a more coherent and dynamic conversation.
751759
chatWithHistory("Why is the sky blue?")
752760
}
753761
754-
Pre-loading the model
755-
---------------------
762+
***********************
763+
Pre-loading the model
764+
***********************
756765

757766
You might have noticed that the first time you run inference on a given model, you'll
758767
have to wait longer for it to complete compared to the second time you call the model.
@@ -889,8 +898,9 @@ that takes a :doc:`Progress <ts-api-ref/interfaces/Progress>` object as input:
889898
<https://github.com/adap/flower/tree/main/intelligence/ts/examples>`_ for more
890899
information!
891900
892-
Flower Confidential Remote Compute
893-
----------------------------------
901+
************************************
902+
Flower Confidential Remote Compute
903+
************************************
894904
895905
Flower Intelligence prioritizes local inference, but also allows to privately handoff
896906
the compute to the Flower Confidential Remote Compute service when local resources are
@@ -1038,8 +1048,9 @@ You will also need to provide a valid API key via the ``apiKey`` attribute.
10381048
}
10391049
}
10401050
1041-
Embedding
1042-
---------
1051+
***********
1052+
Embedding
1053+
***********
10431054
10441055
.. warning::
10451056
@@ -1115,8 +1126,9 @@ You will need to enable ``remoteHandoff`` and to provide a valid API key via the
11151126
11161127
await main().then().catch();
11171128
1118-
How-to guides
1119-
-------------
1129+
***************
1130+
How-to guides
1131+
***************
11201132
11211133
Below you will find some simple guides to get you started.
11221134
@@ -1127,8 +1139,9 @@ Below you will find some simple guides to get you started.
11271139
11281140
how-to-use-crc.rst
11291141
1130-
References
1131-
----------
1142+
************
1143+
References
1144+
************
11321145
11331146
Information-oriented API reference and other reference material.
11341147
@@ -1143,8 +1156,9 @@ Information-oriented API reference and other reference material.
11431156
swift-api-ref/index
11441157
kt-api-ref/index
11451158
1146-
Contributor guides
1147-
------------------
1159+
********************
1160+
Contributor guides
1161+
********************
11481162
11491163
If you are interested in contributing or playing around with the source code.
11501164
@@ -1155,8 +1169,9 @@ If you are interested in contributing or playing around with the source code.
11551169
11561170
contributor-how-to-build-from-source.rst
11571171
1158-
Join the Flower Community
1159-
-------------------------
1172+
***************************
1173+
Join the Flower Community
1174+
***************************
11601175
11611176
The Flower Community is growing quickly - we're a friendly group of researchers,
11621177
engineers, students, professionals, academics, and other enthusiasts.

intelligence/docs/source/ref-models.rst

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
List of available models
2-
========================
1+
##########################
2+
List of available models
3+
##########################
34

45
This document provides an overview of the available models, their providers, and
56
corresponding aliases. Note that all models are also supported via remote inference.
67

7-
Models
8-
------
8+
********
9+
Models
10+
********
911

1012
========================================== ============= ================ ======== ========== ============= ============================================================================== ========================================================================= ==============================================================================
1113
**Model** **Publisher** **Model Family** **Size** **Quant.** **Precision** **Web (On-Device)** **Node.JS (On-Device)** **MLX-Swift (On-Device)**
@@ -23,8 +25,9 @@ Models
2325
``deepseek/r1-distill-llama-8b/q4`` DeepSeek R1 8B Q4 Float 16 `<https://huggingface.co/mlc-ai/DeepSeek-R1-Distill-Llama-8B-q4f16_1-MLC>`__ – `<https://huggingface.co/mlx-community/DeepSeek-R1-Distill-Llama-8B-4bit>`__
2426
========================================== ============= ================ ======== ========== ============= ============================================================================== ========================================================================= ==============================================================================
2527

26-
Aliases
27-
-------
28+
*********
29+
Aliases
30+
*********
2831

2932
The following table lists all aliases for each canonical model:
3033

0 commit comments

Comments
 (0)