Skip to main content

Lightweight OpenAI API server on top of Llama local models. Suitable for combined use with Microsoft AutoGen.

Project description

Llama_CPP OpenAI API Server Project Overview

Introduction

The llama_cpp_openai module provides a lightweight implementation of an OpenAI API server on top of Llama CPP models. This implementation is particularly designed for use with Microsoft AutoGen and includes support for function calls. The project is structured around the llama_cpp_python module and is aimed at facilitating the integration of AI models in applications using OpenAI clients or API.

Project Structure

The project is organized into several key directories and files:

  • llama_cpp_openai: Contains the core implementation of the API server.

    • __init__.py: Initialization file for the module.
    • _api_server.py: Defines the OpenAPI server, using FastAPI for handling requests.
    • _llama_cpp_functions_chat_handler.py: Implements the llama-2-functionary chat handler that supports function calling.
  • examples: Provides example scripts demonstrating the usage of the API server.

    • README.md: Overview and description of example scripts.
    • autogen_basic.py: Basic integration of AutoGen with Llama_CPP using the OpenAI API server.
    • autogen_functions.py: Sets up an AutoGen chatbot with function calls capabilities.
    • basic.py: Demonstrates the setup and start of an API server using the Llama library.

Key Features

  • FastAPI Integration: Utilizes FastAPI for efficient and easy-to-use API endpoints.
  • Llama Library Usage: Leverages the Llama library for handling AI model interactions.
  • Function Call Support: Includes capabilities for function calls in chatbot environments.
  • Examples for Quick Start: Provides example scripts for easy understanding and implementation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_cpp_openai-0.1.1.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_cpp_openai-0.1.1-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file llama_cpp_openai-0.1.1.tar.gz.

File metadata

  • Download URL: llama_cpp_openai-0.1.1.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.7 Linux/6.2.0-1018-azure

File hashes

Hashes for llama_cpp_openai-0.1.1.tar.gz
Algorithm Hash digest
SHA256 46abdf333c29286295c454ad474e150daeb715b8bba801180dca7425580e6102
MD5 ff73cba2578ee0af329fe2403bc323e5
BLAKE2b-256 73fa0ca14813f4037c89584c91ed6c27bb5a20c8144e7b5d97ec209b5486a6b3

See more details on using hashes here.

File details

Details for the file llama_cpp_openai-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: llama_cpp_openai-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.7 Linux/6.2.0-1018-azure

File hashes

Hashes for llama_cpp_openai-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 52beb6e5e0ccbca99f54a329ca1d5fad1ca66a225a7123fb73cbfa502f10b0c6
MD5 2f7fe17caf0b27d5672f83359f88266c
BLAKE2b-256 adc18e320c49fe8b3236ff01347bc6aad915bbebd5731e36570e6f56e3fb4432

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page