Download the PHP package llm-agents/cli-chat without Composer
On this page you can find all versions of the php package llm-agents/cli-chat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package cli-chat
LLM Agents CLI Chat
This cool package gives you a CLI chat interface to chat with LLM agents. It's built on top of Symfony Console, so you know it's gonna be smooth sailing.
What's this all about?
- Start chat sessions with different agents
- Send messages and get responses
- Handle tool calls and their results
- Display chat history
It's perfect for testing your agents or building CLI-based chatbots.
Installation
You can install the package via Composer:
Configuration
This package doesn't require much configuration. The main things you'll need to set up are:
- An implementation of
LLM\Agents\Chat\ChatServiceInterface
- An implementation of
LLM\Agents\Chat\ChatHistoryRepositoryInterface
- An implementation of
LLM\Agents\Chat\SessionInterface
- Your agent registry
- Your tool registry
Usage
To use this package, you need to create two console commands in your application:
- A command to start a chat session
- A command to display chat history
Here's how you can set these up using Spiral framework:
Note: You can use any framework or library that supports Symfony Console commands.
Chat Session Command
This command starts a new chat session:
Chat History Command
This command displays the chat history for a specific session:
To use these commands, you'll need to register them with your application's console kernel or command loader, depending on your framework.
Class Diagram
Here's a quick look at how everything fits together:
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 cli-chat with dependencies
symfony/console Version ^7.0
psr/event-dispatcher Version ^1.0
ramsey/uuid Version ^4.0
llm-agents/agents Version ^1.3
llm-agents/openai-client Version ^1.0
llm-agents/json-schema-mapper Version ^1.0