Weave 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

Php Ai Laravel Package

1tomany/php-ai

View on GitHub
Deep Wiki
Context7

PHP AI and LLM Library

This library provides a single, unified, framework-independent library for integration with several popular AI providers and large language models.

Installation

Install the library using Composer:

composer require 1tomany/php-ai

Symfony Bundle

A Symfony bundle is available if you wish to integrate this library into your Symfony applications with autowiring and configuration support.

Supported platforms

  • Gemini
  • OpenAI

Platform features

Feature Gemini OpenAI
Files
Upload ✅ ✅
Delete ✅ ✅
Queries
Compile ✅ ✅
Run ✅ ✅
SearchStores
Create ✅ ✅
Read ✅ ✅
Delete ✅ ✅
Attach file ✅ ✅
Read file ✅ ✅
Delete file ✅ ✅

Note: Each platform refers to generating output - inference - differently: OpenAI uses "Response", Gemini uses "Interaction", and Anthropic uses "Message". I've decided the word "Query" best represents how you interact with a generative LLM: you compile a query and then run the query to generate a response. The word "Embedding" will continue to be used for embedding models.

To generate a response, you must first compile a query. A query is made up of different input components: text prompts, files, a JSON schema, and/or system instructions. Once the query is compiled, it can be sent to the LLM for inference.

This library allows you to compile a query before sending it to the model for two reasons:

  1. You can log/analyze the request payload before sending it.
  2. You can compile individual requests for batching.

Credits

License

The MIT License

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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums