{"id":34639929,"url":"https://github.com/projectsaturnstudios/llm-speak-mistral","last_synced_at":"2026-01-20T16:29:02.203Z","repository":{"id":307342331,"uuid":"1029245745","full_name":"projectsaturnstudios/llm-speak-mistral","owner":"projectsaturnstudios","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-31T19:09:59.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-26T06:20:53.841Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/projectsaturnstudios.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-30T18:34:58.000Z","updated_at":"2025-07-31T19:09:53.000Z","dependencies_parsed_at":"2025-07-30T20:21:21.410Z","dependency_job_id":"47808efd-ade8-4ae9-b5d8-37a324fb20e5","html_url":"https://github.com/projectsaturnstudios/llm-speak-mistral","commit_stats":null,"previous_names":["projectsaturnstudios/llm-speak-mistral"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/projectsaturnstudios/llm-speak-mistral","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectsaturnstudios%2Fllm-speak-mistral","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectsaturnstudios%2Fllm-speak-mistral/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectsaturnstudios%2Fllm-speak-mistral/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectsaturnstudios%2Fllm-speak-mistral/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/projectsaturnstudios","download_url":"https://codeload.github.com/projectsaturnstudios/llm-speak-mistral/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectsaturnstudios%2Fllm-speak-mistral/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28607131,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-24T17:15:47.353Z","updated_at":"2026-01-20T16:29:02.180Z","avatar_url":"https://github.com/projectsaturnstudios.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LLMSpeak Mistral AI\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![PHP](https://img.shields.io/badge/PHP-8.2%2B-blue.svg)](https://php.net/releases/)\n[![Laravel](https://img.shields.io/badge/Laravel-10.x%7C11.x%7C12.x-red.svg)](https://laravel.com)\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/llm-speak/mistral-ai.svg?style=flat-square)](https://packagist.org/packages/llm-speak/mistral-ai)\n[![Total Downloads](https://img.shields.io/packagist/dt/llm-speak/mistral-ai.svg?style=flat-square)](https://packagist.org/packages/llm-speak/mistral-ai)\n\n**LLMSpeak Mistral AI** is a Laravel package that provides a fluent, Laravel-native interface for integrating with Mistral AI's powerful language models. Built as part of the LLMSpeak ecosystem, it offers seamless access to Mistral's cutting-edge models including Mistral Large, Mistral Medium, and specialized models like Codestral for code generation.\n\n\u003e **Note:** This package is part of the larger [LLMSpeak ecosystem](https://github.com/projectsaturnstudios/llm-speak). For universal provider switching and standardized interfaces, check out the [LLMSpeak Core](https://github.com/projectsaturnstudios/llm-speak-core) package.\n\n## Table of Contents\n- [Features](#features)\n- [Get Started](#get-started)\n- [Usage](#usage)\n  - [Chat Completions](#chat-completions)\n  - [Embeddings](#embeddings)\n  - [Fluent Request Building](#fluent-request-building)\n  - [Tool Calling](#tool-calling)\n  - [Multiple Choices](#multiple-choices)\n  - [Response Formatting](#response-formatting)\n  - [Streaming Responses](#streaming-responses)\n  - [Advanced Configuration](#advanced-configuration)\n- [Response Handling](#response-handling)\n- [Testing](#testing)\n- [Credits](#credits)\n- [License](#license)\n\n## Features\n\n- **🧠 Advanced Models**: Access to Mistral Large, Medium, Small, and specialized models like Codestral\n- **🚀 Laravel Native**: Full Laravel integration with automatic service discovery\n- **🔧 Fluent Interface**: Expressive request builders with method chaining\n- **📊 Laravel Data**: Powered by Spatie Laravel Data for robust data validation\n- **🛠️ Tool Support**: Complete function calling capabilities with flexible tool choice\n- **📝 Embeddings**: Advanced embedding generation with multiple output formats\n- **🎛️ Output Control**: Precise control over embedding dimensions and data types\n- **💨 Streaming**: Real-time streaming responses for chat completions\n- **🎯 JSON Mode**: Structured output generation for reliable data extraction\n- **🎯 Type Safety**: Full PHP 8.2+ type declarations and IDE support\n- **🔐 Secure**: Built-in API key management and request validation\n\n## Get Started\n\n\u003e **Requires [PHP 8.2+](https://php.net/releases/) and Laravel 10.x/11.x/12.x**\n\nInstall the package via [Composer](https://getcomposer.org/):\n\n```bash\ncomposer require llm-speak/mistral-ai\n```\n\nThe package will automatically register itself via Laravel's package discovery.\n\n### Environment Configuration\n\nAdd your Mistral AI API key to your `.env` file:\n\n```env\nMISTRAL_API_KEY=your_mistral_api_key_here\n```\n\nGet your API key from [Mistral AI Console](https://console.mistral.ai/).\n\n## Usage\n\n### Chat Completions\n\nThe simplest way to chat with Mistral AI models:\n\n```php\nuse LLMSpeak\\Mistral\\MistralCompletionsRequest;\n\n$request = new MistralCompletionsRequest(\n    model: 'mistral-large-latest',\n    messages: [\n        ['role' =\u003e 'user', 'content' =\u003e 'Explain quantum computing in simple terms']\n    ]\n);\n\n$response = $request-\u003epost();\n\necho $response-\u003egetTextContent(); // \"Quantum computing is...\"\n```\n\n### Model Selection\n\nChoose the right Mistral model for your use case:\n\n```php\n// Most capable model for complex reasoning\n$request = new MistralCompletionsRequest(\n    model: 'mistral-large-latest',\n    messages: $messages\n);\n\n// Balanced performance and speed\n$request = new MistralCompletionsRequest(\n    model: 'mistral-medium-latest',\n    messages: $messages\n);\n\n// Fast and efficient for simple tasks\n$request = new MistralCompletionsRequest(\n    model: 'mistral-small-latest',\n    messages: $messages\n);\n\n// Specialized for code generation\n$request = new MistralCompletionsRequest(\n    model: 'codestral-latest',\n    messages: $messages\n);\n```\n\n### Embeddings\n\nGenerate embeddings with advanced output control:\n\n```php\nuse LLMSpeak\\Mistral\\MistralEmbeddingsRequest;\n\n// Simple text embedding\n$request = new MistralEmbeddingsRequest(\n    model: 'mistral-embed',\n    input: 'Generate embeddings for this text'\n);\n\n$response = $request-\u003epost();\n\n$embeddings = $response-\u003egetEmbeddings();\n$dimensions = $response-\u003egetDimensions();\n```\n\n### Advanced Embedding Configuration\n\nControl output format and dimensions:\n\n```php\n// High-precision embeddings\n$request = new MistralEmbeddingsRequest(\n    model: 'mistral-embed',\n    input: 'Research paper abstract content'\n)\n-\u003esetOutputDimension(1024)     // Custom dimensions\n-\u003esetOutputDtype('float');     // High precision\n\n// Memory-efficient embeddings\n$request = new MistralEmbeddingsRequest(\n    model: 'mistral-embed',\n    input: ['Text 1', 'Text 2', 'Text 3']  // Batch processing\n)\n-\u003esetOutputDimension(512)      // Reduced dimensions\n-\u003esetOutputDtype('int8');      // Quantized format\n\n// Ultra-compact embeddings\n$request = new MistralEmbeddingsRequest(\n    model: 'mistral-embed',\n    input: $documentTexts\n)\n-\u003esetOutputDimension(256)\n-\u003esetOutputDtype('binary');    // Maximum compression\n\n$response = $request-\u003epost();\n\n// Access different embedding formats\n$embeddings = $response-\u003egetEmbeddings();        // Raw embeddings\n$firstEmbedding = $response-\u003egetFirstEmbedding(); // Single vector\n$count = $response-\u003egetEmbeddingCount();         // Number of embeddings\n```\n\n### Universal LLMSpeak Interface\n\nFor **provider-agnostic embeddings** that work across Mistral, Gemini, Ollama, and other providers, use the universal LLMSpeak interface:\n\n```php\nuse LLMSpeak\\Core\\Support\\Facades\\LLMSpeak;\nuse LLMSpeak\\Core\\Support\\Requests\\LLMSpeakEmbeddingsRequest;\n\n// Universal request works with ANY provider\n$request = new LLMSpeakEmbeddingsRequest(\n    model: 'mistral-embed',\n    input: 'Generate embeddings for this text',\n    encoding_format: 'float',    // Maps to Mistral's outputDtype\n    dimensions: 1024,            // Maps to Mistral's outputDimension\n    task_type: null              // Not applicable for Mistral\n);\n\n// Execute with Mistral - same code works with other providers!\n$response = LLMSpeak::embeddingsFrom('mistral', $request);\n\n// Universal response methods\n$embeddings = $response-\u003egetAllEmbeddings();\n$firstVector = $response-\u003egetFirstEmbedding();\n$dimensions = $response-\u003egetDimensions();\n$tokenUsage = $response-\u003egetTotalTokens();\n```\n\n### Universal Format Mapping\n\nThe universal interface automatically maps encoding formats to Mistral's native types:\n\n```php\n// Float precision (maps to Mistral's outputDtype: 'float')\n$floatRequest = new LLMSpeakEmbeddingsRequest(\n    model: 'mistral-embed',\n    input: 'High precision embeddings',\n    encoding_format: 'float',    // → outputDtype: 'float'\n    dimensions: 1024,            // → outputDimension: 1024\n    task_type: null\n);\n\n$floatResponse = LLMSpeak::embeddingsFrom('mistral', $floatRequest);\n\n// Quantized format (maps to Mistral's outputDtype: 'int8')\n$quantizedRequest = new LLMSpeakEmbeddingsRequest(\n    model: 'mistral-embed',\n    input: 'Memory-efficient embeddings',\n    encoding_format: 'base64',   // → outputDtype: 'int8' (quantized)\n    dimensions: 512,             // → outputDimension: 512\n    task_type: null\n);\n\n$quantizedResponse = LLMSpeak::embeddingsFrom('mistral', $quantizedRequest);\n\n// Batch processing with universal interface\n$batchRequest = new LLMSpeakEmbeddingsRequest(\n    model: 'mistral-embed',\n    input: [\n        'Document one for embeddings',\n        'Document two for embeddings',\n        'Document three for embeddings'\n    ],\n    encoding_format: 'float',\n    dimensions: null,            // Use model default\n    task_type: null\n);\n\n$batchResponse = LLMSpeak::embeddingsFrom('mistral', $batchRequest);\n\necho \"Generated {$batchResponse-\u003egetEmbeddingCount()} embeddings\";\necho \"Vector dimensions: {$batchResponse-\u003egetDimensions()}\";\n```\n\n### Advanced Universal Configuration\n\nAccess Mistral's advanced features through the universal interface:\n\n```php\n// Ultra-compact embeddings with automatic format mapping\n$compactRequest = new LLMSpeakEmbeddingsRequest(\n    model: 'mistral-embed',\n    input: 'Large document corpus for storage',\n    encoding_format: 'base64',   // Automatically maps to binary/int8\n    dimensions: 256,             // Reduced dimensions for storage\n    task_type: null\n);\n\n$compactResponse = LLMSpeak::embeddingsFrom('mistral', $compactRequest);\n\n// Different models with same interface\n$models = ['mistral-embed', 'codestral-embed'];\nforeach ($models as $model) {\n    $request = new LLMSpeakEmbeddingsRequest(\n        model: $model,\n        input: 'Code snippet for analysis',\n        encoding_format: 'float',\n        dimensions: 1024,\n        task_type: null\n    );\n    \n    $response = LLMSpeak::embeddingsFrom('mistral', $request);\n    echo \"Model {$model}: {$response-\u003egetDimensions()} dimensions\";\n}\n```\n\n### Why Use Universal Interface?\n\n**✅ Provider Independence:** Switch between Mistral, Gemini, Ollama with zero code changes  \n**✅ Automatic Mapping:** Encoding formats automatically mapped to provider-specific types  \n**✅ Future Proof:** New providers automatically supported  \n**✅ Consistent API:** Same methods across all providers  \n**✅ Type Safety:** Full PHP type declarations and IDE support  \n\n```php\n// Same request works with different providers!\n$request = new LLMSpeakEmbeddingsRequest(\n    model: 'embedding-model',\n    input: 'Universal text input',\n    encoding_format: 'float',\n    dimensions: 512,\n    task_type: null\n);\n\n$mistralResponse = LLMSpeak::embeddingsFrom('mistral', $request); // Mistral AI\n$geminiResponse = LLMSpeak::embeddingsFrom('gemini', $request);   // Google AI  \n$ollamaResponse = LLMSpeak::embeddingsFrom('ollama', $request);   // Local models\n```\n\n### Fluent Request Building\n\nBuild complex requests using the fluent interface:\n\n```php\nuse LLMSpeak\\Mistral\\MistralCompletionsRequest;\n\n$request = new MistralCompletionsRequest(\n    model: 'mistral-large-latest',\n    messages: [\n        ['role' =\u003e 'user', 'content' =\u003e 'Write a creative story about AI']\n    ]\n)\n-\u003esetMaxTokens(2000)\n-\u003esetTemperature(0.8)\n-\u003esetPresencePenalty(0.1)\n-\u003esetFrequencyPenalty(0.1)\n-\u003esetStop(['THE END', '---']);\n\n$response = $request-\u003epost();\n\n// Access response properties\necho $response-\u003eid;                    // chatcmpl-abc123\necho $response-\u003emodel;                 // mistral-large-latest\necho $response-\u003egetTotalTokens();      // 1850\necho $response-\u003egetTextContent();      // Generated story\n```\n\n### Batch Configuration\n\nSet multiple parameters at once:\n\n```php\n$request = new MistralCompletionsRequest(\n    model: 'mistral-medium-latest',\n    messages: $conversation\n)-\u003esetMultiple([\n    'maxTokens' =\u003e 1500,\n    'temperature' =\u003e 0.7,\n    'presencePenalty' =\u003e 0.2,\n    'frequencyPenalty' =\u003e 0.1,\n    'stop' =\u003e ['Human:', 'Assistant:'],\n    'n' =\u003e 3  // Generate 3 different responses\n]);\n```\n\n### Tool Calling\n\nEnable Mistral models to use external functions:\n\n```php\n$tools = [\n    [\n        'type' =\u003e 'function',\n        'function' =\u003e [\n            'name' =\u003e 'get_weather_forecast',\n            'description' =\u003e 'Get weather forecast for a specific location',\n            'parameters' =\u003e [\n                'type' =\u003e 'object',\n                'properties' =\u003e [\n                    'location' =\u003e [\n                        'type' =\u003e 'string',\n                        'description' =\u003e 'City and country (e.g., \"Paris, France\")'\n                    ],\n                    'days' =\u003e [\n                        'type' =\u003e 'integer',\n                        'description' =\u003e 'Number of days to forecast (1-7)',\n                        'minimum' =\u003e 1,\n                        'maximum' =\u003e 7\n                    ]\n                ],\n                'required' =\u003e ['location']\n            ]\n        ]\n    ]\n];\n\n$request = new MistralCompletionsRequest(\n    model: 'mistral-large-latest',\n    messages: [\n        ['role' =\u003e 'user', 'content' =\u003e 'What\\'s the weather forecast for London this week?']\n    ]\n)\n-\u003esetTools($tools)\n-\u003esetToolChoice('auto');  // Let model decide when to use tools\n\n$response = $request-\u003epost();\n\n// Check for tool usage\nif ($response-\u003eusedTools()) {\n    $toolCalls = $response-\u003egetToolCalls();\n    foreach ($toolCalls as $call) {\n        echo \"Function: {$call['function']['name']}\\n\";\n        echo \"Arguments: \" . json_encode($call['function']['arguments']) . \"\\n\";\n    }\n}\n```\n\n### Multiple Choices\n\nGenerate multiple response alternatives:\n\n```php\n$request = new MistralCompletionsRequest(\n    model: 'mistral-large-latest',\n    messages: [\n        ['role' =\u003e 'user', 'content' =\u003e 'Give me three different marketing slogans for an eco-friendly product']\n    ]\n)\n-\u003esetN(3)                    // Generate 3 different responses\n-\u003esetTemperature(0.9);       // Higher creativity for variety\n\n$response = $request-\u003epost();\n\n// Access all choices\n$allChoices = $response-\u003egetAllChoices();\nforeach ($allChoices as $index =\u003e $choice) {\n    echo \"Option \" . ($index + 1) . \": \" . $choice['message']['content'] . \"\\n\\n\";\n}\n\n// Or get a specific choice\n$firstChoice = $response-\u003egetChoice(0);\n$secondChoice = $response-\u003egetChoice(1);\n```\n\n### Response Formatting\n\nControl output format for structured data:\n\n```php\n$request = new MistralCompletionsRequest(\n    model: 'mistral-large-latest',\n    messages: [\n        [\n            'role' =\u003e 'user', \n            'content' =\u003e 'Extract the following information from this text as JSON: name, age, occupation. Text: \"John Smith is a 35-year-old software engineer.\"'\n        ]\n    ]\n)\n-\u003esetResponseFormat(['type' =\u003e 'json_object'])\n-\u003esetMaxTokens(200);\n\n$response = $request-\u003epost();\n\n$jsonContent = $response-\u003egetTextContent();\n$data = json_decode($jsonContent, true);\n\necho \"Name: \" . $data['name'];           // John Smith\necho \"Age: \" . $data['age'];             // 35\necho \"Occupation: \" . $data['occupation']; // software engineer\n```\n\n### Streaming Responses\n\nEnable real-time streaming for long responses:\n\n```php\n$request = new MistralCompletionsRequest(\n    model: 'mistral-large-latest',\n    messages: [\n        ['role' =\u003e 'user', 'content' =\u003e 'Write a detailed technical article about machine learning']\n    ]\n)\n-\u003esetStream(true)\n-\u003esetMaxTokens(4000);\n\n$response = $request-\u003epost();\n\n// Stream handling will be processed by the CompletionsEndpoint\n// Response contains streaming data format\n```\n\n### Advanced Configuration\n\nConfigure advanced parameters for optimal performance:\n\n```php\n$request = new MistralCompletionsRequest(\n    model: 'mistral-large-latest',\n    messages: $conversationHistory\n)\n-\u003esetMaxTokens(4000)\n-\u003esetTemperature(0.7)\n-\u003esetPresencePenalty(0.3)     // Encourage topic diversity\n-\u003esetFrequencyPenalty(0.2)    // Reduce repetition\n-\u003esetStop(['[END]', '###'])   // Custom stop sequences\n-\u003esetN(2)                     // Generate 2 alternatives\n-\u003esetResponseFormat(['type' =\u003e 'json_object']);\n\n$response = $request-\u003epost();\n```\n\n## Response Handling\n\nAccess comprehensive response data:\n\n```php\n$response = $request-\u003epost();\n\n// Basic response info\n$responseId = $response-\u003eid;\n$modelUsed = $response-\u003emodel;\n$timestamp = $response-\u003ecreated;\n$responseObject = $response-\u003eobject;\n\n// Content access\n$textContent = $response-\u003egetTextContent();\n$allChoices = $response-\u003egetAllChoices();\n$firstChoice = $response-\u003egetChoice(0);\n\n// Token usage analysis\n$totalTokens = $response-\u003egetTotalTokens();\n$promptTokens = $response-\u003egetPromptTokens();\n$completionTokens = $response-\u003egetCompletionTokens();\n\n// Completion analysis\n$finishReason = $response-\u003egetFinishReason();\n$completedNaturally = $response-\u003ecompletedNaturally();\n$hitTokenLimit = $response-\u003ereachedTokenLimit();\n$stoppedBySequence = $response-\u003estoppedBySequence();\n\n// Tool usage analysis\n$usedTools = $response-\u003eusedTools();\n$toolCalls = $response-\u003egetToolCalls();\n$hasAnyToolCalls = $response-\u003ehasAnyToolCalls();\n\n// Quality metrics\n$responseQuality = $response-\u003ecalculateQualityScore();\n$isHighQuality = $response-\u003eisHighQuality();\n\n// System information\n$systemFingerprint = $response-\u003esystem_fingerprint;\n\n// Convert to array for storage\n$responseArray = $response-\u003etoArray();\n\n// Embeddings Response Handling\n$embeddingResponse = $embeddingRequest-\u003epost();\n\n$embeddings = $embeddingResponse-\u003egetEmbeddings();\n$firstVector = $embeddingResponse-\u003egetFirstEmbedding();\n$dimensions = $embeddingResponse-\u003egetDimensions();\n$embeddingCount = $embeddingResponse-\u003egetEmbeddingCount();\n$tokenUsage = $embeddingResponse-\u003egetTotalTokens();\n```\n\n## Testing\n\nThe package provides testing utilities for mocking Mistral responses:\n\n```php\nuse LLMSpeak\\Mistral\\MistralCompletionsRequest;\nuse LLMSpeak\\Mistral\\MistralCompletionsResponse;\nuse LLMSpeak\\Mistral\\MistralEmbeddingsResponse;\n\n// Create a mock chat completion response\n$mockResponse = new MistralCompletionsResponse(\n    id: 'chatcmpl-test123',\n    object: 'chat.completion',\n    created: time(),\n    model: 'mistral-large-latest',\n    choices: [\n        [\n            'index' =\u003e 0,\n            'message' =\u003e [\n                'role' =\u003e 'assistant',\n                'content' =\u003e 'Mock response content'\n            ],\n            'finish_reason' =\u003e 'stop'\n        ]\n    ],\n    usage: [\n        'prompt_tokens' =\u003e 15,\n        'completion_tokens' =\u003e 20,\n        'total_tokens' =\u003e 35\n    ]\n);\n\n// Test your application logic\n$this-\u003eassertEquals('Mock response content', $mockResponse-\u003egetTextContent());\n$this-\u003eassertEquals(35, $mockResponse-\u003egetTotalTokens());\n$this-\u003eassertTrue($mockResponse-\u003ecompletedNaturally());\n\n// Create a mock embeddings response\n$mockEmbeddingResponse = new MistralEmbeddingsResponse(\n    id: 'emb-test123',\n    object: 'list',\n    data: [\n        [\n            'object' =\u003e 'embedding',\n            'embedding' =\u003e array_fill(0, 1024, 0.1),\n            'index' =\u003e 0\n        ]\n    ],\n    model: 'mistral-embed',\n    usage: [\n        'prompt_tokens' =\u003e 5,\n        'total_tokens' =\u003e 5\n    ],\n    status_code: 200,\n    headers: []\n);\n\n// Test embedding functionality\n$this-\u003eassertEquals(1024, $mockEmbeddingResponse-\u003egetDimensions());\n$this-\u003eassertEquals(1, $mockEmbeddingResponse-\u003egetEmbeddingCount());\n```\n\n## Credits\n\n- [Project Saturn Studios](https://github.com/projectsaturnstudios)\n- [Mistral AI](https://mistral.ai) for providing advanced language models\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n---\n\n**Part of the LLMSpeak Ecosystem** - Built with ❤️ by [Project Saturn Studios](https://projectsaturnstudios.com)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectsaturnstudios%2Fllm-speak-mistral","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprojectsaturnstudios%2Fllm-speak-mistral","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectsaturnstudios%2Fllm-speak-mistral/lists"}