hosonode/easyai-php 问题修复 & 功能扩展

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

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

hosonode/easyai-php

Composer 安装命令:

composer require hosonode/easyai-php

包简介

EasyAI-PHP is an open-source initiative designed to significantly simplify the entry into artificial intelligence for PHP-developers.

README 文档

README

About The Project

EasyAI-PHP is an open-source initiative designed to significantly simplify the entry into artificial intelligence for PHP-developers (so basically Lang-Chain for PHP). Based on PHP 8.1+, this project integrates advanced AI models and utilities, allowing developers to incorporate complex AI functionalities with minimal coding.

Key Features

  • Multiple AI Models: Incorporates OpenAI's GPT-3.5, GPT-4, and Claude 3 (Opus, Sonnet & Haiku), along with Gemini 1.0 & 1.5 models.
  • AI Utilities: Offers a variety of helpers such as vector databases from Pinecone and embeddings through OpenAI, streamlining the integration of advanced AI features into your projects.
  • Minimal Coding Requirement: Designed to minimize the coding effort needed on your part, thanks to the numerous ready-to-use helpers.

Getting Started

Install the project using Composer:

composer require hosonode/easyai-php

Usage

💬 Usage of OpenAIChat

Documentation: https://hosonode.gitbook.io/easyai-php/openaichat/basic-usage

↔️ Usage of EmbeddingGenerator\OpenAI

An "embedding" is a vector representation of text that captures semantic meanings of the words or phrases. These vectors are generated by deep learning models and can be used in machine learning applications to compare texts, search for similar content, or feed into other machine learning models for tasks like classification or clustering. Each component of the vector represents a dimension of the text's meaning, allowing the model to understand and process text similarly to how humans do but in a numerical form.

Documentation: https://hosonode.gitbook.io/easyai-php/embedding/basic-usage

📂 Usage of PineconeVectorStore

The advantage of using Pinecone is that it offers a serverless package where you only pay for what you use. You don't need your own AWS, Google Cloud or Azure for this. This model is highly cost-effective as it eliminates overcapacity and unnecessary expenses.

Documentation: https://hosonode.gitbook.io/easyai-php/pinecone/basic-usage

Usage of Crawler & Zyte API

Documentation: https://hosonode.gitbook.io/easyai-php/crawler/basic-usage

Usage of Tools

Documentation: https://hosonode.gitbook.io/easyai-php/tools/basic-usage

🗺️ Roadmap

✔️ Completed Features:

  • OpenAI GPT-3.5 and GPT-4 Helpers:
  • Embedding Helpers: With OpenAI
  • Pinecone Vector Databases Add: Add Vector/s Delete them
  • Pinecone Vector Databases Search: Semantic Search
  • Zyte API: With Guzzle as beginner
  • DOM Crawling: With Symfony DOM Crawler
  • Tools: AsyncHttpRequests, HTML Cleaner, HTMl Extractor, Site Type Classifier, etc.
  • DataForSEO: Integration of DatForSEO API Integration

🚧 In Progress:

  • P1: AI Translator: With Gemini 1.0 & 1.5
  • P1: PageSpeed Insights API:
  • P1: Gemini 1.0 & 1.5: Text Generation
  • P2: Gemini 1.0 & 1.5: Vision Support
  • P3: Gemini 1.0 & 1.5: Full Multimodal support
  • P2: BunnyCDN: Upload big files or text to CDN

🚀 Planned Features:

  • P2: Claude 3 (Opus, Sonnet & Haiku) Helpers:
  • P2: Embedding: AI Text Chunking: With GPT3.5 or Claude 3 Haiku or Gimini 1.0
  • P2: Embedding: Text Chunking: By separators and limits
  • P1: Claude 3 (Opus, Sonnet & Heiku): Text Generation
  • P2: Claude 3 (Opus, Sonnet & Heiku): Vision Support
  • P2: DALL·E 3: Image Creationg
  • P3: AI Translator: With DeepL
  • P3: AI Translator: With GPT 3.5 & GPT 4
  • P3: AI Translator: With Claude 3 (Opus, Sonnet & Heiku)
  • P3: Tokenizer for PHP: With https://github.com/yethee/tiktoken-php
  • P3: OpenAI Whisper: Audio Support
  • P3: Example: Pinecone semantic search tool: UI
  • P3: Example: AI Colosseum: Test differnt AIs with same input

FAQ

Q1: Why using EasyAi-PHP and not OpenAI PHP SDK

A1: If you are an experienced developer and want to use many features of OpenAI, the OpenAI PHP SDK might be right for you. However, if you want to make simple requests to the OpenAI interface with very few lines of code, our repo is the right one for you, as we have programmed many helpers that you can use many AI and PHP helpers to improve your project. Many studies and research papers also show that you should use many different AI agents to do different tasks, each AI has its strengths, weaknesses, functions, etc.. Therefore, it would be very difficult to familiarize yourself with all AIs, which is why we offer a kind of AI framework for you here.

Contributing

We highly encourage community contributions. Whether you're a developer using our helpers or someone looking to enhance the functionalities of EasyAI-PHP, your contributions are welcome. This collaborative effort benefits everyone involved.

Open-Source Projects Used

This project utilizes several community-driven packages to power its features:

Support

For AI-related inquiries, contact our HosonoAI support at support@hosono.ai. For service-related questions, reach out to support@hosono.de. We offer support in German, English, Japanese, Russian, and Italian.

Sponsored by

  • HosonoDE: An e-commerce agency serving mainly D-A-CH (Germany / Austria / Switzerland) customers.
  • HosonoAI: A platform that enables easy, code-free creation of texts for e-commerce and marketing.

hosonode/easyai-php 适用场景与选型建议

hosonode/easyai-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 257 次下载、GitHub Stars 达 10, 最近一次更新时间为 2024 年 04 月 15 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「api」 「language」 「ai」 「embedding」 「openai」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 hosonode/easyai-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 hosonode/easyai-php 我们能提供哪些服务?
定制开发 / 二次开发

基于 hosonode/easyai-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 10
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-15