LLPhant icon indicating copy to clipboard operation
LLPhant copied to clipboard

Standardize config classes

Open BreyndotEchse opened this issue 1 year ago • 4 comments

  • Downgrade symfony/cache to 6.4 (LTS): 7.x requires PHP 8.2+
  • Move openai-php/client to require-dev & suggest: OpenAI is not required for Ollama or Anthropic chats. Treat it like other soft deps
  • Standardize config classes: Config classes were rather different. One used public properties only, another accepted constructor params as well. One used constants, another enums. One set its defaults in the config class, another used a constant in the respective chat class and so on... Now everything concerning configuration is found in the config classes.

BreyndotEchse avatar Sep 10 '24 16:09 BreyndotEchse

Error is false-positive. Runs without any issues with latest pestphp/pest*, phpstan/phpstan, rector/re ctor versions

BreyndotEchse avatar Sep 10 '24 17:09 BreyndotEchse

Since I only use ollama I'd also prefer to have openai-sdk as optional, while php8.2+ is file for me

fballiano avatar Sep 12 '24 09:09 fballiano

Hey everyone, sorry for being a bit busy lately (starting my company).

Good point—it should be moved to require-dev.
@BreyndotEchse, the dependency config is set to "dependency-version: [prefer-lowest, prefer-stable]" to ensure compatibility with older versions.

MaximeThoonsen avatar Oct 11 '24 15:10 MaximeThoonsen

Hey @BreyndotEchse : you can take my commit here to fix your problems : https://github.com/theodo-group/LLPhant/pull/237

MaximeThoonsen avatar Oct 11 '24 22:10 MaximeThoonsen