Skip to content

SuperUserNameMan/php-ollama-chat-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-ollama-chat-client

Very basic command line Ollama chat client written in simple PHP8.

How ?

php -e chat.php

php -e tool_test.php (the LLM has access to a tool function get_datetime.)

Requirements :

  • Ollama
  • PHP 8 CLI
  • curl
  • readline
  • json

Why ?

  • base-code for quick experiments ;
  • base-code for prototyping function calling agents ;
  • solves my python allergies ;

Warnings :

  • 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, only qwen3 and llama3.2 are able to call tools, and sometimes granite3.3)

About

Very basic command line Ollama chat client written in simple PHP8.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages