Skip to content

Commit 7c6c0b5

Browse files
committed
stamp: adding Session information
1 parent dd2ddad commit 7c6c0b5

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

ext/ai/README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,15 @@ features for the `Supabase.ai` namespace.
1616
`Supabase.ai` uses [onnxruntime](https://onnxruntime.ai/) as internal model
1717
execution engine, backend by [ort pyke](https://ort.pyke.io/) rust bindings.
1818

19-
Following there's specific documentation for both "lands":
20-
2119
<details>
22-
<summary>Javascript/Frontend</summary>
20+
<summary>Javascript docs</summary>
2321

2422
The **onnxruntime** API is available from `globalThis` and shares similar specs of [onnxruntime-common](https://github.com/microsoft/onnxruntime/tree/main/js/common).
2523

2624
The available items are:
2725

28-
- `Tensor`: represent a basic tensor with specified dimensions and data type. -- "The AI input/output"
29-
- `InferenceSession`: represent the inner model session. -- "The AI model itself"
26+
- `Tensor`: Represent a basic tensor with specified dimensions and data type. -- "The AI input/output"
27+
- `InferenceSession`: Represent the inner model session. -- "The AI model itself"
3028

3129
### Usage
3230

@@ -53,7 +51,7 @@ console.log(last_hidden_state);
5351

5452
### Third party libs
5553

56-
Originaly this backend was created to implicit integrate with [transformers.js](https://github.com/huggingface/transformers.js/). This way users can still consuming a high-level lib at same time they benefits of all Supabase's Model Execution Engine features, like model optimization and caching. For further information pleas check the [PR #436](https://github.com/supabase/edge-runtime/pull/436)
54+
Originaly this backend was created to implicit integrate with [transformers.js](https://github.com/huggingface/transformers.js/). This way users can still consuming a high-level lib at same time they benefits of all Supabase's Model Execution Engine features, like model optimization and caching. For further information please check the [PR #436](https://github.com/supabase/edge-runtime/pull/436)
5755

5856
> [!WARNING]
5957
> At this moment users need to explicit target `device: 'auto'` to enable the platform compatibility.
@@ -98,10 +96,11 @@ setInterval(async () => {
9896

9997
</details>
10098

101-
<details>
102-
<summary>Rust/Backend</summary>
103-
</details>
99+
## The `Session` class
104100

105-
onnxruntime:
101+
Prior versions has [introduced](https://supabase.com/blog/ai-inference-now-available-in-supabase-edge-functions) the `Session` class as alternative to `transformers.js` for *gte-small* model and then was used to provide a [LLM interface](https://supabase.com/docs/guides/functions/ai-models?queryGroups=platform&platform=ollama#using-large-language-models-llm) for Ollama and some other providers.
106102

107-
the Session class:
103+
Since the **Model Execution Engine** was created the `Session` class now can focus on LLM interface while the `Session('gte-small')` is for compatibility purposes only.
104+
105+
> [!WARNING]
106+
> Docs for Session class will end here - There's a open [PR #539](https://github.com/supabase/edge-runtime/pull/539) that may change a lot of things for it.

0 commit comments

Comments
 (0)