Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Groq Php Laravel Package

lucianotonet/groq-php

PHP client for the Groq API. Provides a simple, lightweight way to call Groq LLM endpoints from PHP apps, with support for common chat/completions workflows and easy integration into existing projects.

View on GitHub
Deep Wiki
Context7
v1.3.0

Breaking Changes in Files/Batches Module

  • Changed JSONL file format requirements for batch processing
  • Restricted file extensions to .jsonl only (removed support for .json, .txt, .ndjson)
  • Added stricter validation for file contents and structure

Changed

  • Updated Files API validation to properly handle 'batch' purpose
  • Added support for additional MIME types: application/x-jsonlines, application/jsonl, application/x-ndjson, application/x-ndjason
  • Updated JSONL file format documentation and examples
  • Updated tests to use new JSONL format and purpose
  • Improved file validation order in FileManager.php
  • Fixed JSONL file validation in FileManager to properly check content format
  • Enhanced error messages for file type validation
  • Improved test coverage for file upload functionality

Added

  • New example file: examples/batch-processing.php
  • Additional test cases for JSONL file validation
  • Improved error messages for file validation
  • Test results: 39 tests, 218 assertions (all passing)
  • Added more comprehensive validation for JSONL file contents
  • Support for audio transcription and translation in batch processing
  • Support for chat completions in batch processing

Fixed

  • Issue with file type validation in FileManager::validateFile method
  • Improved MIME type detection for JSONL files
  • Fixed test case for file upload to use correct JSONL format
  • Corrected JSONL test file structure to match API requirements

Migration Guide for Files/Batches Module

If you are using the Files/Batches module, you will need to:

  1. Update your JSONL files to include required fields:
    • custom_id: Your unique identifier for tracking
    • method: Must be "POST"
    • url: One of: /v1/chat/completions, /v1/audio/transcriptions, or /v1/audio/translations
    • body: Request parameters matching the endpoint format
  2. Ensure all files use .jsonl extension
  3. Update file content to match new validation requirements
  4. Review the updated documentation for complete format specifications
v1.0.0
  • 23/03/2025 test: Add EnvironmentVariablesTest for GROQ_API_KEY and GROQ_API_BASE
  • 23/03/2025 fix: prevent TypeError from unset GROQ_API_BASE environment variable
  • 23/03/2025 refactor: Update depracated models on examples and tests to use Llama 3
  • 27/02/2025 docs: Update README
  • 23/02/2025 fix: Fix general warning - 'The version field is present, it is recommended to leave it out if the package is published on Packagist.'
  • 23/02/2025 Add GitHub Actions workflow for running tests
v0.1.2
  • 23/02/2025 chore: Bump version to v0.1.2
  • 23/02/2025 Merge pull request #11 from lucianotonet/feat/files-and-batches
  • 23/02/2025 Apply suggestions from code review
  • 23/02/2025 Apply suggestions from code review
  • 23/02/2025 Add comprehensive test suite for Groq PHP library
  • 23/02/2025 Adds reasoning format options to example
  • 23/02/2025 Adds file and batch processing capabilities
v0.1.0
  • 18/02/2025 chore: bump version to 0.1.0
  • 18/02/2025 Merge pull request #10 from lucianotonet/develop
  • 18/02/2025 Update temperature input range in reasoning example
  • 18/02/2025 Update README with comprehensive configuration options and new reasoning/tool calling documentation
  • 18/02/2025 Renames max_tokens to max_completion_tokens
  • 18/02/2025 Adds reasoning feature
  • 18/02/2025 Merge pull request #9 from lguichard/main
  • 18/02/2025 Fixes
  • 14/02/2025 Fix - Update completions parameters
v0.0.10
  • 29/10/2024 Update version to 0.0.10 in composer.json, add API key options in README.
  • 29/10/2024 Merge pull request #8 from lucianotonet/develop
  • 29/10/2024 Merge branch 'hotfix/test-vision-with-url' into main
  • 29/10/2024 Merge branch 'hotfix/test-vision-with-url' into develop
  • 29/10/2024 Translate messages
  • 29/10/2024 hotfix: Update image URL in VisionTest
  • 29/10/2024 Merge branch 'feature/apikey-on-runtime' into develop
  • 29/10/2024 feat: Update Groq class properties and setOptions method.
  • 19/09/2024 feat: Ensure API key is explicitly set during initialization
  • 19/09/2024 feat(Vision): add default model and enhance analyze method
  • 19/09/2024 feat: add parallel tool calls and additional parameters for flexibility
  • 08/09/2024 Update image URL in README for Groq PHP project
v0.0.9
  • 06/09/2024 Merge remote-tracking branch 'origin/main'
  • 06/09/2024 Fix: Re-added missing parameters on request
  • 06/09/2024 Update README.md
  • 05/09/2024 Update package URL in README for consistency and clarity.
  • 05/09/2024 Add image to README for Groq PHP project
  • 04/09/2024 Update README.md
  • 04/09/2024 Merge tag 'v0.0.9' and add Vision functionality for image analysis. - Merge tag 'v0.0.9' - Add Vision functionality for image analysis and examples
  • 04/09/2024 Merge tag 'v0.0.9'
  • 04/09/2024 Merge pull request #6 from tgeorgel/main
  • 04/09/2024 Add Vision functionality for image analysis and examples:
  • 03/09/2024 fix: Prevent the language to be forced on the transcript endpoint
  • 02/08/2024 Update Groq PHP package version to 0.0.8
v0.0.8
  • 02/08/2024 Update Groq PHP package version to 0.0.8
  • 02/08/2024 feat: Update examples
  • 02/08/2024 feat: Enhance error handling and improve API response management
  • 30/07/2024 chore: Update badges in README.md
v0.0.7
  • 23/07/2024 chore: Bump version to 0.0.7
  • 23/07/2024 Test: Validate API key and integrate model listing
  • 23/07/2024 Refactor: Enhance Error Handling and Improve Code Quality
  • 23/07/2024 docs: Update Changelog
  • 23/07/2024 feat: Add list models feature
  • 23/07/2024 chore: Update to use $_ENV instead of getenv() for improved reliability
  • 23/07/2024 chore: Change GROQ_API_BASE_URL env var to GROQ_API_BASE
v0.0.6
  • 19/07/2024 feat: Add speech-to-text transcription and translation features
v0.0.4
  • 20/04/2024 Add examples folder + some improvements: - Add support for response streaming and JSON mode. - Improve error handling with more descriptive errors. - Add usage examples. - Fix bugs related to streaming and JSON mode. - Update minimum PHP version. - Add unit tests.
  • 13/04/2024 Fix: Cannot assign bool to property LucianoTonet\GroqPHP\Groq::$baseUrl of type string
  • 30/03/2024 Update README
v0.0.3
v0.0.1
v0.1.1
v0.0.5
  • 04/07/2024 Merge pull request #4 from lucianotonet/versionfix
  • 04/07/2024 Fix version mismatch
  • 04/07/2024 Update composer.json
  • 20/06/2024 Merge pull request #3 from JosephGabito/main
  • 21/06/2024 Update README.md
  • 13/06/2024 Docs: Mark Models endpoint as completed (1c9a24d)
  • 13/06/2024 Remove unrelated scripts
  • 13/06/2024 Docs: Remove max retries from readme
  • 13/06/2024 Refatoração: Melhora a legibilidade do código em exemplos
  • 13/06/2024 feat: Remove Llama2 references as it is not available anymore
  • 18/05/2024 Refactored error handling and added documentation examples for Groq PHP library.
  • 17/05/2024 Refactor script filenames for brevity and clarity. Rename CHANGELOG_GENERATOR.sh to CHANGELOG_GEN.sh and CHANGELOG_GENERATOR_AI.sh to CHANGELOG_GEN_AI.sh for concise and consistent naming conventions.
  • 17/05/2024 Add Groq API key and base URL to .env.example file
  • 16/05/2024 Add Models class and list method for fetching models from API
v0.0.2
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport