You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-5Lines changed: 19 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,15 +10,32 @@ Originally created as a demo for the talk [»Have you met ada? - Word Embeddings
10
10
this package is
11
11
functional yet designed to encourage further development and contributions.
12
12
13
+
**Please note that this package is still in development and may not be suitable for production use.**
14
+
13
15
## Installation
14
16
15
-
Install via composer:
17
+
At the moment, the installation process depends on the `"minimum-stability"` setting in your `composer.json`. If you have
18
+
`"minimum-stability": "dev"`, you can install the package directly:
16
19
17
20
```bash
18
21
composer require fiveam-code/ada-laravel
19
22
```
20
23
21
-
Ensure that your database is configured to use PostgreSQL with the vector extension.
24
+
Otherwise, you need to add the package with a temporary dev dependency to your `composer.json`:
25
+
26
+
```json
27
+
{
28
+
"require": {
29
+
"fiveam-code/ada-laravel": "^0.1.0",
30
+
"rajentrivedi/tokenizer-x": "dev-upgrade-laravel-11 as 1.0.0"
31
+
}
32
+
}
33
+
```
34
+
35
+
Then you can run `composer update` to install the package.
36
+
37
+
Ensure that your database is configured to use PostgreSQL with the vector extension. The package will enable the extension
38
+
via a migration if it is not already enabled.
22
39
23
40
Publish the migrations and run them:
24
41
@@ -97,10 +114,8 @@ The lookup method allows for direct querying of your model's stored knowledge, f
97
114
retrieves the most contextually relevant information using vector similarity.
98
115
99
116
```php
100
-
use App\Models\Paper;
101
117
use Ada\Models\Embedding;
102
118
103
-
$paper = Paper::first();
104
119
$answer = Embedding::lookup("Where does the PHP elephant live?");
105
120
106
121
// "The PHP elephant inhabits 'Silicon Forests'—regions where natural woodlands merge seamlessly with data-rich environments. These forests are dense with both foliage and floating data points."
@@ -131,7 +146,6 @@ If you want to further customize the prompt, you can pass an object form a class
0 commit comments