mecomedia/centaurus-ai 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mecomedia/centaurus-ai

最新稳定版本:0.1.7

Composer 安装命令:

composer require mecomedia/centaurus-ai

包简介

Centaurus-AI – Laravel package by mecomedia.

README 文档

README

Introduction

CentaurusAI is a library that combines the chatbot API of the most important LLMs so that LLMs can be quickly and easily exchanged to another. Access is standardized to reduce implementation effort.

Access to the Google Document API is also implemented for the ocr evaluation of PDF documents. This makes it easy to extract text from uploaded documents.

The Embedding API from OpenAI is also implemented for use in environments with vector databases.

Installation

Installation via composer

composer require mecomedia/centaurus-ai

Configuration of the AI API credentials in the .env file

CLAUDE3_API_KEY=sk-ant-api03-XXXXXXXXX

OPENAI_API_KEY=sk-proj-XXXXXXXXX
OPENAI_ORGANIZATION=org-XXXXXXXXX
OPENAI_REQUEST_TIMEOUT=300

GEMINI_API_KEY=XXXXXXXXX
GEMINI_REQUEST_TIMEOUT=300

MISTRAL_API_KEY=XXXXXXXXX
MISTRAL_API_URL=https://api.mistral.ai/v1

IONOS_API_KEY=XXXXXXXXX
IONOS_API_URL=https://openai.inference.de-txl.ionos.com

GOOGLE_DOCUMENT_AI_JSON=core-forklift-XXXXXXXXX.json
GOOGLE_DOCUMENT_AI_PROJECT_ID=XXXXXXXXX
GOOGLE_DOCUMENT_AI_PROCESSOR_ID=XXXXXXXXX
GOOGLE_DOCUMENT_AI_LOCATION=eu
GOOGLE_DOCUMENT_AI_ENDPOINT=eu-documentai.googleapis.com

Use the facade in your controllers or services

use Mecomedia\CentaurusAI\Facades\CentaurusAI;

Process OCR (PDF documents only)

$ocr = CentaurusAI::processOcrDocument($filename);

AI chat requests to several AI API

$messages = [
    [
        'role' => 'user',
        'content' => 'Hello, how are you?'
    ],
    [
        'role' => 'user',
        'content' => 'I am fine, thank you.'
    ]
];

$response = sendAnthropic($messages, 4096, AIModels::CLAUDE_37);
$response = sendOpenAI($messages, AIModels::OPENAI_MODEL_5O_NANO);
$response = sendGemini($messages, AIModels::GEMINI_25_LITE, 0.5);
$response = sendMistral($messages, AIModels::MISTRAL_LARGE, 0.3);
$response = sendIonos($messages, AIModels::IONOS_LAMA_33, 'float');

统计信息

  • 总下载量: 29
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-08-22