Crate ceylon_llm

Crate ceylon_llm 

Source
Expand description

§Ceylon LLM

LLM (Large Language Model) integration layer for the Ceylon agent framework.

This crate provides a unified interface for interacting with various LLM providers including OpenAI, Anthropic, Ollama, Google, and many others.

§Supported Providers

  • OpenAI (GPT-4, GPT-4o, GPT-3.5)
  • Anthropic (Claude 3, Claude 3.5)
  • Ollama (local models: Llama, Mistral, Gemma, etc.)
  • Google (Gemini models)
  • DeepSeek
  • xAI (Grok)
  • Groq
  • Mistral
  • Cohere
  • Phind
  • OpenRouter

§Quick Start

use ceylon_llm::{UniversalLLMClient, LLMConfig};

// Create client with model name (API key from environment)
let client = UniversalLLMClient::new("openai::gpt-4o", None)?;

// Or with explicit configuration
let config = LLMConfig::new("anthropic::claude-3-sonnet-20240229")
    .with_temperature(0.7)
    .with_max_tokens(1000);

let client = UniversalLLMClient::new_with_config(config)?;

Re-exports§

pub use client::LLMConfig;
pub use client::LLMResponse;
pub use client::LLMResponseTrait;
pub use client::ToolCall;
pub use client::UniversalLLMClient;
pub use llm_agent::LlmAgent;
pub use llm_agent::LlmAgentBuilder;

Modules§

client
LLM (Large Language Model) integration layer.
llm_agent
react
types