Mcpixir.Application (Mcpixir v0.1.0)

View Source

Application module for Mcpixir that handles LangChain integration and other application-level concerns.

Summary

Functions

Gets the Anthropic module if available.

Formats messages for LangChain integration. Safely handles the conversion, falling back to the original messages if LangChain is unavailable.

Checks if LangChain integration is available. Always use this function instead of directly checking Code.ensure_loaded.

Gets the LangChain models module if available.

Load optional dependencies like LangChain

Gets the OpenAI module if available.

Functions

anthropic_module()

Gets the Anthropic module if available.

format_messages_for_langchain(messages)

Formats messages for LangChain integration. Safely handles the conversion, falling back to the original messages if LangChain is unavailable.

langchain_available?()

Checks if LangChain integration is available. Always use this function instead of directly checking Code.ensure_loaded.

langchain_models_module()

Gets the LangChain models module if available.

load_optional_dependencies()

Load optional dependencies like LangChain

Returns a boolean indicating whether LangChain is available.

openai_module()

Gets the OpenAI module if available.