Download the PHP package llm-agents/json-schema-mapper without Composer
On this page you can find all versions of the php package llm-agents/json-schema-mapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download llm-agents/json-schema-mapper
More information about llm-agents/json-schema-mapper
Files in llm-agents/json-schema-mapper
Package json-schema-mapper
Short Description JSON Schema to PHP Class Mapper for LLM Agents
License MIT
Informations about the package json-schema-mapper
JSON Schema Mapper for LLM Agents
This package is a super handy JSON Schema Mapper for the LLM Agents project.
What's it all about?
This package gives you a nifty SchemaMapper that can:
- Convert PHP classes to JSON schemas
- Turn JSON data into PHP objects
Class Diagram
Here's a quick look at how the main components fit together:
Getting Started
Installation
First things first, let's get this package installed:
Setting it up in Spiral
If you're using the Spiral framework (and why wouldn't you be? It's awesome!), you'll need to register the bootloader.
Here's how:
- Open up your
app/src/Application/Kernel.php
file. - Add the
LLM\Agents\JsonSchema\Mapper\Integration\Spiral\SchemaMapperBootloader
to thedefineBootloaders()
method:
And that's it! The bootloader will take care of registering all the necessary components for you.
Setting it up in Laravel
If you're using the Laravel framework, you'll need to register the Service provider.
Here's how:
Just register the LLM\Agents\JsonSchema\Mapper\Integration\Laravel\SchemaMapperServiceProvider
And that's it! The service provider will take care of registering all the necessary components for you.
How to Use It
Converting a PHP Class to JSON Schema
Let's say you have a User
class and you want to get its JSON schema:
Converting JSON to a PHP Object
Got some JSON data that you want to turn into a PHP object? No problem:
Contributing
We'd love your help to make this package even better! Here's how you can contribute:
- Fork the repository
- Write some awesome code
- Create a new Pull Request
Please make sure your code follows PSR-12 coding standards and include tests for any new features.
License
This package is open-sourced software licensed under the MIT license. Feel free to use it, modify it, and share it!
That's all, folks! If you have any questions or run into any issues, don't hesitate to open an issue on GitHub.
All versions of json-schema-mapper with dependencies
spiral/json-schema-generator Version ^1.0
llm-agents/agents Version ^1.0
cuyz/valinor Version ^1.12