Skip to content

Commit 4c8df0c

Browse files
committed
refactor: remove ALBERT_MODEL env var and simplify examples
- Remove ALBERT_MODEL from .env and examples - Use standard model names that Albert will route appropriately - Remove toolcall and stream examples for simplicity - Update README documentation
1 parent 76a02d2 commit 4c8df0c

File tree

6 files changed

+4
-147
lines changed

6 files changed

+4
-147
lines changed

.env

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ GOOGLE_API_KEY=
6868
# For using Albert API (French Sovereign AI)
6969
ALBERT_API_KEY=
7070
ALBERT_API_URL=
71-
ALBERT_MODEL=
7271

7372
# For MariaDB store. Server defined in compose.yaml
7473
MARIADB_URI=pdo-mysql://[email protected]:3309/my_database

examples/albert/README.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
```bash
1212
export ALBERT_API_KEY="your-api-key"
1313
export ALBERT_API_URL="https://your-albert-instance.com"
14-
export ALBERT_MODEL="albert-7b-v2" # or your configured model
1514
```
1615

1716
## Examples
@@ -28,17 +27,6 @@ php examples/albert/rag.php
2827
```
2928
Shows how to use Albert's built-in RAG capabilities with document context.
3029

31-
### Streaming
32-
```bash
33-
php examples/albert/stream.php
34-
```
35-
Demonstrates real-time streaming responses from Albert API.
36-
37-
### Tool Calling
38-
```bash
39-
php examples/albert/toolcall.php
40-
```
41-
Shows how to use function/tool calling with Albert API.
4230

4331
## Configuration
4432

@@ -63,6 +51,6 @@ $platform = PlatformFactory::create(
6351

6452
## Notes
6553

66-
- The model name depends on your Albert deployment configuration
54+
- Albert will route requests to the appropriate backend based on your deployment configuration
6755
- Albert supports various model backends (OpenAI, vLLM, HuggingFace TEI)
6856
- Check your Albert instance documentation for available models and features

examples/albert/chat.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@
3131
baseUrl: rtrim((string) $albertApiUrl, '/').'/v1/', // Ensure proper URL format
3232
);
3333

34-
// Use the model name provided by your Albert instance
35-
// This could be a custom model or one of the supported backends
36-
$model = new GPT($_ENV['ALBERT_MODEL'] ?? 'albert-7b-v2');
34+
// Use a model name - Albert will route to the appropriate backend
35+
$model = new GPT('gpt-4o');
3736

3837
$chain = new Chain($platform, $model);
3938

examples/albert/rag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
baseUrl: rtrim((string) $albertApiUrl, '/').'/v1/',
3030
);
3131

32-
$model = new GPT($_ENV['ALBERT_MODEL'] ?? 'albert-7b-v2');
32+
$model = new GPT('gpt-4o');
3333
$chain = new Chain($platform, $model);
3434

3535
// Albert API supports RAG out of the box

examples/albert/stream.php

Lines changed: 0 additions & 50 deletions
This file was deleted.

examples/albert/toolcall.php

Lines changed: 0 additions & 79 deletions
This file was deleted.

0 commit comments

Comments
 (0)