Download the PHP package logipro/chatbot-php without Composer
On this page you can find all versions of the php package logipro/chatbot-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download logipro/chatbot-php
More information about logipro/chatbot-php
Files in logipro/chatbot-php
Package chatbot-php
Short Description Client PHP for Chatbot API
License MIT
Homepage https://github.com/frederic100/chatbot-php
Informations about the package chatbot-php
Chatbot PHP
Client PHP for Chatbot API
Install
Ou pour installer depuis le dépôt :
Usage
1. Initialisation
Créez un client en spécifiant l'URL de l'API :
Ou utilisez l'URL par défaut :
2. Créer un contexte
Un contexte contient les instructions ou le contexte que l'assistant utilisera :
3. Uploader un fichier
Ajoutez des fichiers que l'assistant pourra utiliser :
4. Créer un assistant
Créez un assistant basé sur un contexte et des fichiers :
5. Créer un thread (conversation avec assistant)
Démarrez une conversation avec votre assistant :
6. Continuer la conversation
Envoyez des messages supplémentaires dans le thread :
Ressources disponibles
Contexts - Gestion des contextes
Files - Gestion des fichiers
Assistants - Gestion des assistants
Conversations - Gestion des conversations simples
Threads - Gestion des threads (conversations avec assistant)
Contributing
Requirements
- docker
- git
Add a .env.local file
To install locally or on a development server, be careful with the following environment variables:
- DATA_PATH: path where data is stored; must be inside the project (default: ./data)
- DATA_PATH_STORE: path for backups; generally outside the project (default: ../data/chatbot-php)
- REMOVE_DATABASE_WHEN_INSTALL: remove database during install (default: false)
- BUILD_WHEN_INSTALL: build application during install (default: false)
- DOCKER_DEV: run development-specific containers (default: false)
- DOCKER_PHP_BUILT_IMAGE: application prebuilt Docker image
- OPTIONAL_VOLUME: mount a local volume for localhost development (default: empty)
- LOCALDEV_WORKING_DIR: working directory useful for development (default: undefined)
- URL_API: override the base URL used by internal API clients (default: empty)
- PULL_POLICY: policy for pulling the PHP built image on start (default: missing)
Typical local development .env.local:
Typical server development .env.local:
For production and pre-production, a .env.local MUST NOT exist because default variables target the production environment.
However, this project includes a frontend that calls the API, so in pre-production you need a .env.local to override URL_API.
Typical pre-production .env.local:
Tests
Unit tests
We use Test-Driven Development (TDD) principles and good practices.
Integration tests
Integration tests are all test categories other than unit tests.
Acceptance tests
Acceptance tests are integration tests that verify the application against feature specifications. Gherkin is the specification language; Behat is the PHP runner.
Manual tests
Then open 172.17.0.1:35080/ in your browser.
Quality
Some indicators we aim for:
- phpcs PSR12
- phpstan level 10
- coverage >=100%
- infection MSI >=100%
Quick check:
Check coverage:
Then open var/index.html in your browser.
Check infection:
Then open var/infection.html in your browser.
All versions of chatbot-php with dependencies
symfony/http-client Version >=7.0
symfony/http-foundation Version >=7.0
symfony/mime Version >=7.0