Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions docs/components/platform.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,22 @@ very flexible and powerful interface for working with AI models.
Models
------

The component provides a model base class :class:`Symfony\\AI\\Platform\\Model` which is a combination of a model name, a set of
capabilities, and additional options. Usually, bridges to specific providers extend this base class to provide a quick
start for vendor-specific models and their capabilities.
The component provides a generic model base class :class:`Symfony\\AI\\Platform\\Model` which is a combination of a
model name, a set of capabilities, and additional options. Usually, bridges to specific providers extend this base class
to provide a quick start for vendor-specific models and their capabilities.

Capabilities are a list of strings defined by :class:`Symfony\\AI\\Platform\\Capability`, which can be used to check if a model
supports a specific feature, like ``Capability::INPUT_AUDIO`` or ``Capability::OUTPUT_IMAGE``.

Options are additional parameters that can be passed to the model, like ``temperature`` or ``max_tokens``, and are
usually defined by the specific models and their documentation.

Additionally, the component provides two more specific base classes, that are needed to trigger built-in API endpoint
and result conversion implementations:

* :class:`Symfony\\AI\\Platform\\Model\\CompletionsModel` - for models that support text completions
* :class:`Symfony\\AI\\Platform\\Model\\EmbeddingsModel` - for models that support vector embeddings

Model Size Variants
~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -106,7 +112,7 @@ When using the bundle, the usage of ``OllamaApiCatalog`` is available via the ``
api_catalog: true

Supported Models & Platforms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----------------------------

* **Language Models**
* `OpenAI's GPT`_ with `OpenAI`_, `Azure`_ and `OpenRouter`_ as Platform
Expand All @@ -118,7 +124,6 @@ Supported Models & Platforms
* `Amazon's Nova`_ with `AWS Bedrock`_ as Platform
* `Mistral's Mistral`_ with `Mistral`_ and `OpenRouter`_ as Platform
* `Albert API`_ models with `Albert`_ as Platform (French government's sovereign AI gateway)
* `LiteLLM`_ as unified Platform
* **Embeddings Models**
* `Gemini Text Embeddings`_ with `Google`_ and `OpenRouter`_
* `Vertex AI Text Embeddings`_ with `Vertex AI`_
Expand All @@ -136,6 +141,16 @@ Supported Models & Platforms
* `Cartesia TTS`_ with `Cartesia`_ as Platform
* `Cartesia STT`_ with `Cartesia`_ as Platform

Generic Platforms
~~~~~~~~~~~~~~~~~

Platforms like `LiteLLM`_ or `OpenRouter`_ provide a unified API to access multiple models from different providers.
Therefore, they rely on endpoint and contract design, that is inspired by OpenAI's original GPT API - an implicit
standard in the industry. Platforms using this de facto standard can be used without the need of a dedicated bridge, by
using built-in classes::

???

Options
-------

Expand Down
4 changes: 2 additions & 2 deletions src/ai-bundle/src/AiBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@
use Symfony\AI\Platform\Capability;
use Symfony\AI\Platform\Exception\RuntimeException;
use Symfony\AI\Platform\Message\Content\File;
use Symfony\AI\Platform\ModelClientInterface;
use Symfony\AI\Platform\ModelClient\ModelClientInterface;
use Symfony\AI\Platform\Platform;
use Symfony\AI\Platform\PlatformInterface;
use Symfony\AI\Platform\ResultConverterInterface;
use Symfony\AI\Platform\ResultConverter\ResultConverterInterface;
use Symfony\AI\Store\Bridge\Azure\SearchStore as AzureSearchStore;
use Symfony\AI\Store\Bridge\ChromaDb\Store as ChromaDbStore;
use Symfony\AI\Store\Bridge\ClickHouse\Store as ClickHouseStore;
Expand Down
21 changes: 0 additions & 21 deletions src/platform/src/Bridge/AiMlApi/Completions.php

This file was deleted.

47 changes: 0 additions & 47 deletions src/platform/src/Bridge/AiMlApi/Completions/ModelClient.php

This file was deleted.

40 changes: 0 additions & 40 deletions src/platform/src/Bridge/AiMlApi/Completions/ResultConverter.php

This file was deleted.

50 changes: 0 additions & 50 deletions src/platform/src/Bridge/AiMlApi/Embeddings/ModelClient.php

This file was deleted.

47 changes: 0 additions & 47 deletions src/platform/src/Bridge/AiMlApi/Embeddings/ResultConverter.php

This file was deleted.

Loading