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.
- Concept
Prompt - Prompt for concept extraction.
- Relationship
- A relationship between two concepts.
- Relationship
Prompt - Prompt for relationship identification.
Enums§
- Concept
Type - Type of concept extracted by LLM.
- LlmError
- LLM-related errors.
- Relation
Type - Type of relationship between concepts.
Traits§
- LlmBackend
- Core trait for LLM backends.
- Prompt
Template - A prompt template for LLM requests.
Type Aliases§
- LlmResult
- Result type for LLM operations.