symfony/ai-lm-studio-platform
Symfony AI bridge for LM Studio. Connect to LM Studio’s OpenAI-compatible local endpoints to run and test LLMs from Symfony applications. Part of the Symfony AI ecosystem; issues and PRs are handled in the main symfony/ai repository.
symfony/ai-platform or planning to adopt it. Extends Symfony’s generic platform with LM Studio support, enabling unified AI service management.http://localhost:1234/v1/).chat/completions, embeddings).lmstudio/lmstudio:latest) with dedicated GPU/CPU.composer require symfony/ai-lm-studio-platform
config/packages/ai.yaml:
framework:
ai:
providers:
lm_studio:
platform: lm_studio
endpoint: http://localhost:1234/v1/
model: "TheBloke/Llama-2-7B-Chat-GGUF"
auth: null
use Symfony\AI\Chat\ChatCompletion;
use Symfony\AI\Message;
$response = $container->get(ChatCompletion::class)->create([
'model' => 'lm_studio',
'messages' => [new Message('user', 'Hello!')],
]);
llama-2 to LM Studio, gpt-3.5 to OpenAI).HttpClient must be configured for LM Studio’s endpoint.LM_STUDIO_ENDPOINTLM_STUDIO_MODELLM_STUDIO_API_KEY (if authentication is needed)./chat/completions, /embeddings).CircuitBreaker or a custom solution.Stopwatch or Prometheus.How can I help you explore Laravel packages today?