Rag.Ai.Claude (rag v0.3.4)
View SourceClaude provider implementation using claude_agent_sdk.
This provider excels at analysis, writing, and agentic workflows with strong safety guarantees. It does NOT support embeddings - use Gemini for that.
Note: This module is only available when claude_agent_sdk is installed.
Examples
# Basic text generation
provider = Claude.new(%{})
{:ok, response} = Claude.generate_text(provider, "Hello!", [])
# With system prompt
{:ok, response} = Claude.generate_text(
provider,
"Analyze this code",
system_prompt: "You are an expert code reviewer"
)
Summary
Functions
Returns the cost per 1K tokens as {input_cost, output_cost} in USD.
Returns the maximum context window in tokens.
Returns whether this provider supports embeddings.
Returns whether this provider supports tool calling.
Types
Functions
Returns the cost per 1K tokens as {input_cost, output_cost} in USD.
@spec max_context_tokens() :: pos_integer()
Returns the maximum context window in tokens.
@spec supports_embeddings?() :: boolean()
Returns whether this provider supports embeddings.
@spec supports_tools?() :: boolean()
Returns whether this provider supports tool calling.