Skip to main content

Crate phago_llm

Crate phago_llm 

Source
Expand description

§Phago LLM

LLM integration for Phago semantic intelligence.

This crate provides optional LLM backends for enhanced concept extraction, relationship labeling, and query expansion.

§Features

  • api: Cloud API backends (Claude, OpenAI)
  • local: Local backends (Ollama)
  • full: All backends

§Usage

use phago_llm::{LlmBackend, OllamaBackend};

let backend = OllamaBackend::new("http://localhost:11434");
let concepts = backend.extract_concepts("Cell membrane transport").await?;

Modules§

prelude
Prelude for convenient imports.

Structs§

Concept
A concept extracted from text by an LLM.
ConceptPrompt
Prompt for concept extraction.
Relationship
A relationship between two concepts.
RelationshipPrompt
Prompt for relationship identification.

Enums§

ConceptType
Type of concept extracted by LLM.
LlmError
LLM-related errors.
RelationType
Type of relationship between concepts.

Traits§

LlmBackend
Core trait for LLM backends.
PromptTemplate
A prompt template for LLM requests.

Type Aliases§

LlmResult
Result type for LLM operations.