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: doc/mistral-client/Basics/quick_start.md
+35-12
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,5 @@
1
+
# PhpMistral
2
+
1
3
**PhpMistral** is an **open-source** PHP client designed to interact with various LLM inference servers (like Mistral, Hugging Face TGI, vLLM, Ollama, llama.cpp, xAI, and more), embedding servers, and Hugging Face datasets.
2
4
It provides a unified interface for chat completions (streaming & non-streaming), embeddings (dense & sparse), reranking, guided JSON generation, document generation, and Hugging Face dataset management.
3
5
@@ -6,33 +8,53 @@ It provides a unified interface for chat completions (streaming & non-streaming)
6
8
7
9
---
8
10
11
+
## 🛠 PSR-18 Compatible HTTP Client
12
+
13
+
**PhpMistral** has been fully refactored to comply with **PSR-18** recommendations (PHP Standards Recommendation for HTTP clients).
14
+
This means you can plug in **any HTTP client** that implements PSR-18, including:
15
+
16
+
-**Guzzle**
17
+
-**Symfony HttpClient**
18
+
-**cURL-based clients**
19
+
-**Buzz**
20
+
- Any other compliant client!
21
+
22
+
> [!IMPORTANT]
23
+
> The library does **not lock you** into any specific HTTP client. Choose the one that best fits your framework, performance needs, or preferences.
24
+
Whether you're using **Symfony**, **Laravel**, or a custom stack, PhpMistral integrates seamlessly into your environment.
25
+
26
+
This ensures **flexibility**, **interoperability**, and **future-proofing** of your PHP AI integrations.
27
+
28
+
---
29
+
9
30
## Key Features
10
31
11
-
-**Open-source**:
12
-
- Free to use, modify, and contribute to.
13
-
-**Framework-agnostic**:
14
-
- Compatible with any PHP framework (Laravel, Symfony, Slim, custom apps, etc.).
15
-
-**Multi-backend support**:
32
+
-**Open-source**:
33
+
- Free to use, modify, and contribute to.
34
+
-**Framework-agnostic**:
35
+
- Compatible with any PHP framework (Laravel, Symfony, Slim, custom apps, etc.).
36
+
-**Multi-backend support**:
16
37
- OpenAI, Mistral Platform, Hugging Face TGI, vLLM, Ollama, llama.cpp, xAI, and more.
17
-
-**Chat completions**:
38
+
-**Chat completions**:
18
39
- Streaming and non-streaming interactions.
19
-
-**Embeddings**:
40
+
-**Embeddings**:
20
41
- Dense embeddings and sparse embeddings (Splade pooling).
21
-
-**Reranking API**:
42
+
-**Reranking API**:
22
43
- Compare and rank multiple documents based on a query.
23
-
-**Guided JSON generation**:
44
+
-**Guided JSON generation**:
24
45
- Ensure structured outputs based on a schema.
25
-
-**Document generation (Mistral)**:
46
+
-**Document generation (Mistral)**:
26
47
- Generate structured documents directly from models.
27
-
-**Pooling API (vLLM)**:
48
+
-**Pooling API (vLLM)**:
28
49
- Efficient load balancing across multiple vLLM servers.
29
-
-**Hugging Face Dataset API**:
50
+
-**Hugging Face Dataset API**:
30
51
- Seamlessly interact with Hugging Face datasets, list files, download, manage, and search datasets directly from PHP.
31
52
32
53
> [!IMPORTANT]
33
54
> The Hugging Face Dataset API is a **must-have** for anyone working with finetuning or dataset manipulation. Easily list, fetch, and manage datasets from Hugging Face directly in your PHP applications.
34
55
35
56
---
57
+
36
58
## Supported Providers & Features
37
59
38
60
### Core Features
@@ -67,6 +89,7 @@ It provides a unified interface for chat completions (streaming & non-streaming)
0 commit comments