tredmann/php-llm-client
最新稳定版本:v0.3.0
Composer 安装命令:
composer require tredmann/php-llm-client
包简介
README 文档
README
General Client API to easy access to several LLM APIs (OpenAPI, Ollama, Google Gemini)
Installation
composer require tredmann/php-llm-client
Usage
use LLM\Enums\Type; use LLM\LLM; $llm = LLM::make(Type::Ollama); echo $llm->completion( model: 'gemma2:latest', prompt: 'What is the capital of Germany?', temperature: 1.0 ); // Output: The capital of Germany is **Berlin**.
Supported Providers/LLMs
- OpenAI (
Type::OpenAI) - OpenAI Legacy Completion (
Type::OpenAILegacy) - Ollama (
Type::Ollama) - Google Gemini (
Type::Gemini)
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-01-08