Very basic command line Ollama chat client written in simple PHP8.
php -e chat.php
php -e tool_test.php
(the LLM has access to a tool function get_datetime
.)
- Ollama
- PHP 8 CLI
- curl
- readline
- json
- base-code for quick experiments ;
- base-code for prototyping function calling agents ;
- solves my python allergies ;
- only tested on Linux MATE Terminal
- uses terminal color codes (duno how it behaves on non compatible terminals)
- tools function calling does not work with all models that prentend to have the
tools
capabitily (on all model i tested, onlyqwen3
andllama3.2
are able to call tools, and sometimesgranite3.3
)