Skip to content

hyperf/odin

Repository files navigation

English | 中文

Odin

Odin is a PHP-based LLM application development framework. Its naming is inspired by the chief god Odin from Norse mythology and his two ravens Huginn and Muninn, which represent thought and memory respectively. Every morning at dawn, they fly to the human world and return in the evening to bring back what they have seen and heard to Odin. This project aims to help developers create more intelligent and flexible applications using LLM technology, providing more possibilities for LLM technology implementation through a series of powerful and easy-to-use features.

Core Features

  • Multi-Model Support: Supports various large language models including OpenAI, Azure OpenAI, AWS Bedrock, Doubao, ChatGLM, and more
  • Unified Interface: Provides consistent API interface, simplifying integration with different LLM providers
  • Tool Calling: Supports Function Calling, allowing models to invoke custom tools and functions
  • MCP Integration: Based on dtyq/php-mcp to implement Model Context Protocol support, easily integrating external tools and services
  • Memory Management: Provides flexible memory management system, supporting conversation context persistence
  • Vector Storage: Integrates Qdrant vector database, supporting knowledge retrieval and semantic search
  • Agent Development: Built-in Agent framework, supporting intelligent agent development
  • High Performance: Optimized implementation, supporting streaming responses and efficient processing

System Requirements

  • PHP >= 8.0
  • PHP Extensions: bcmath, curl, mbstring
  • Composer >= 2.0
  • Hyperf Framework (2.2.x, 3.0.x or 3.1.x)

Installation

composer require hyperf/odin

Quick Start

  1. After installation, publish the configuration files:
php bin/hyperf.php vendor:publish hyperf/odin
  1. Configure your API key in the .env file:
OPENAI_API_KEY=your_openai_api_key
  1. Set the default model in config/autoload/odin.php:
return [
    'llm' => [
        'default' => 'gpt-4o', // Set your default model
        // ... other configurations
    ],
];

Documentation

Detailed documentation can be found in the doc/user-guide directory:

License

Odin is open-sourced software licensed under the MIT license.

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 5

Languages